anyvar.storage.mapper_registry

Central registry for all object mappers.

class anyvar.storage.mapper_registry.MapperRegistry[source]

Central registry for all object mappers.

__init__()[source]

Initialize the MapperRegistry with known mappers.

from_db_entity(db_entity)[source]

Convert any DB entity to its corresponding VRS model.

get_mapper(entity_type)[source]

Get mapper for the given entity type.

Return type:

BaseMapper

to_db_entity(anyvar_entity)[source]

Convert any VRS model to its corresponding DB entity.

Return type:

Base