from .validator import *  # noqa
from .validator import Message


def _message_as_dict(self):
    return dict((attr, getattr(self, attr)) for attr in dir(self)
                if not attr.startswith('_'))

Message._asdict = _message_as_dict
