pydent.marshaller.ModelRegistry

class pydent.marshaller.ModelRegistry(name, bases, selfdict)[source]

Bases: type

Stores list of all models instantiated from the SchemaModel base.

Saves model to the registry.

__init__(name, bases, selfdict)[source]

Saves model to the registry.

Methods

__init__(name, bases, selfdict)

Saves model to the registry.

get_model(name)

Gets a model class by name.

mro

Return a type’s method resolution order.

Attributes

BASE

model_schema

Returns the class’s schema.

models

classmethod get_model(name)[source]

Gets a model class by name.

property model_schema

Returns the class’s schema.

mro()

Return a type’s method resolution order.