Skip to content

hyperion.adapters.schema_registry.local

hyperion.adapters.schema_registry.local

Local-filesystem :class:SchemaStore adapter (lite -- stdlib only).

LocalSchemaStore

LocalSchemaStore(schemas_path=AVRO_SCHEMAS_PATH)

Bases: SchemaStore

Schema store for local files.

Initialize the local schema store with the given path.

Parameters:

Name Type Description Default
schemas_path Path

The path to the schemas. Defaults to AVRO_SCHEMAS_PATH.

AVRO_SCHEMAS_PATH
Source code in hyperion/adapters/schema_registry/local.py
def __init__(self, schemas_path: Path = AVRO_SCHEMAS_PATH) -> None:
    """Initialize the local schema store with the given path.

    Args:
        schemas_path (Path, optional): The path to the schemas. Defaults to AVRO_SCHEMAS_PATH.
    """
    super().__init__(schemas_path.as_posix())
    self.schemas_path = schemas_path
    if not schemas_path.exists():
        logger.critical("Provided schemas path does not exist.", schemas_path=schemas_path.as_posix())
        raise FileNotFoundError("Provided schemas path does not exist.")