registry

module of dascore.models source

The registry which lets a serialized document name the class it holds.

The object_type key holds a registered name, avoiding dependence on module paths and arbitrary imports when reading documents.

Functions

Name Description
check_tag_matches Refuse a document whose tag names some other class.
get_model_tag Return the tag which names a model class in a document, if it has one.
register_model Add a model class to the registry under its derived tag.
registered_models Return the registered classes, keyed by the tag naming each.
resolve_model_tag Return the class a tag names, or None if nothing registers it.
resolve_tagged_model Return the model class a tag names.