noether.data.zarr_store.stores

Storage helpers so the Zarr store can live locally or on object storage.

A store_root may be a local path or an fsspec URL (s3://, gs://, az://, memory://, …). Local roots use the fast LocalStore; URLs use FsspecStore. Path joining is done as plain /-joins so it works for both local paths and URLs (pathlib would mangle s3:// into s3:/).

For s3:// URLs, if the optional obstore package is installed, the faster Rust-backed ObjectStore is used instead of FsspecStore (it reads credentials/region/endpoint from the standard AWS_* environment variables). Without obstore, or for any non-S3 URL, the fsspec backend is used — so this is a transparent, opt-in speedup.

Functions

is_remote(store_root)

Return True if store_root is an fsspec URL backed by a non-local filesystem.

join(store_root, relpath)

Join relpath onto a local path or URL store root (URL-safe, unlike Path).

make_store(path, *[, read_only])

Build a Zarr store for path.

Module Contents

noether.data.zarr_store.stores.is_remote(store_root)

Return True if store_root is an fsspec URL backed by a non-local filesystem.

Parameters:

store_root (str | pathlib.Path)

Return type:

bool

noether.data.zarr_store.stores.join(store_root, relpath)

Join relpath onto a local path or URL store root (URL-safe, unlike Path).

Parameters:
Return type:

str

noether.data.zarr_store.stores.make_store(path, *, read_only=False)

Build a Zarr store for path.

Uses the Rust-backed ObjectStore for s3:// URLs when the optional obstore package is installed, FsspecStore for any other URL (or for S3 without obstore), and LocalStore for local paths.

Parameters:
Return type:

zarr.abc.store.Store