Skip to content

hyperion.adapters.schema_registry.s3

hyperion.adapters.schema_registry.s3

S3-backed :class:SchemaStore adapter (requires boto3 -- [aws]).

S3SchemaStore

S3SchemaStore(bucket, prefix)

Bases: SchemaStore

Schema store for S3.

Initialize the S3 schema store with the given bucket and prefix.

Parameters:

Name Type Description Default
bucket str

The S3 bucket.

required
prefix str

The prefix in the bucket.

required
Source code in hyperion/adapters/schema_registry/s3.py
def __init__(self, bucket: str, prefix: str) -> None:
    """Initialize the S3 schema store with the given bucket and prefix.

    Args:
        bucket (str): The S3 bucket.
        prefix (str): The prefix in the bucket.
    """
    super().__init__(f"s3://{bucket}/{prefix}")
    self.bucket = bucket
    self.prefix = prefix
    self.s3_client = S3Client()