pydent.marshaller.SchemaRegistry¶
-
class
pydent.marshaller.
SchemaRegistry
(name, bases, selfdict)[source]¶ Bases:
type
Stores a list of models that can be accessed by name.
Saves model to the registry.
Methods
__init__
(name, bases, selfdict)Saves model to the registry.
get_model_schema
(model_name)Gets a model schema from a model name.
get_schema
(name)Gets model by model_name.
make_schema_name
(name)Makes a Schema class name from a model name (appending ‘Schema’ to name)
Return a type’s method resolution order.
Attributes
BASE
The shcmea fields.
Fields grouped by their base classes.
The registered model class.
schemas
-
property
fields
¶ The shcmea fields.
-
property
grouped_fields
¶ Fields grouped by their base classes.
Returns empty list of base class not in fields.
-
static
make_schema_name
(name)[source]¶ Makes a Schema class name from a model name (appending ‘Schema’ to name)
-
property
model_class
¶ The registered model class.
-
mro
()¶ Return a type’s method resolution order.
-
property