@classmethod
def from_dict(cls, data):
    """Convert a dictionary to an object.

        :param dict data: The data dictionary.
        :returns Base: The object converted from the dictionary.
        """
    entity = cls()
    for attr in entity.__attrs__:
        if not attr.allow_from:
            continue
        value = data.get(attr.name)
        if attr.deserializer:
            value = attr.deserializer(value)
        setattr(entity, attr.name, value)
    return entity
