Skip to content

Store

The store module provides a factory for opening Zarr stores from path strings. Paths starting with s3:// open S3-backed stores; all other paths open local filesystem stores.

Factory

zagg.store.open_store

open_store(path: str, read_only: bool = False, **kwargs) -> Store

Open a Zarr store from a path string.

Parameters:

  • path (str) –

    Store path. s3://bucket/prefix opens an S3-backed store; all other paths open a local filesystem store.

  • read_only (bool, default: False ) –

    Whether to open in read-only mode.

  • **kwargs

    For S3 stores: region (default "us-west-2").

Returns:

Helpers

zagg.store.parse_s3_path

parse_s3_path(path: str) -> tuple[str, str]

Parse an s3://bucket/prefix path into bucket and prefix.

Parameters:

  • path (str) –

    S3 URI (must start with s3://).

Returns:

  • tuple of (bucket, prefix)

Raises:

  • ValueError

    If path does not start with s3://.