Skip to content

Schema Registry

Each schema table is registered in SchemaRegistry dynamically at the runtime.

build_schema

build_schema(name: str | SchemaName, filepath: str) -> list[SchemaTable]

Build schema dataclass from json file path.

Parameters:

  • name (str | SchemaName) –

    Name of schema table.

  • filepath (str) –

    Path to json file.

Returns:

  • list[SchemaTable]

    List of schema dataclasses.

SCHEMAS module-attribute

SCHEMAS = SchemaRegistry()

SchemaRegistry

SchemaRegistry()

A manager class to register schema tables.

build_from_json

build_from_json(key: str | SchemaName, filepath: str) -> list[SchemaTable]

Build schema dataclass from json.

Parameters:

  • key (str) –

    Name of schema field.

  • filepath (str) –

    Path to schema json file.

Returns:

  • list[SchemaTable]

    Instantiated dataclass.