FieldDescriptorinstances serve as field accessors on models.
Metaclass for Models.
Model(raw_data=None, trusted_data=None, deserialize_mapping=None, init=True, partial=True, strict=True, validate=False, app_data=None, lazy=False, **kwargs)¶
Enclosure for fields and validation. Same pattern deployed by Django models, SQLAlchemy declarative extension and other developer friendly libraries.
- raw_data (Mapping) – The data to be imported into the model instance.
- deserialize_mapping (Mapping) – Can be used to provide alternative input names for fields. Values may be strings or lists of strings, keyed by the actual field name.
- partial (bool) – Allow partial data to validate. Essentially drops the
required=Truesettings from field definitions. Default: True
- strict (bool) – Complain about unrecognized keys. Default: True