Skip to content

pixano.features.schemas.registry

register_schema(cls)

Class decorator to register a schema.

Parameters:

Name Type Description Default
cls type[BaseSchema]

The schema to register.

required
Source code in pixano/features/schemas/registry.py
def register_schema(cls: type[BaseSchema]):
    """Class decorator to register a schema.

    Args:
        cls: The schema to register.
    """
    _add_schema_to_registry(cls, _SCHEMA_REGISTRY)
    return cls