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¶
|
Return True if store_root is an fsspec URL backed by a non-local filesystem. |
|
Join relpath onto a local path or URL store root (URL-safe, unlike |
|
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:
- noether.data.zarr_store.stores.join(store_root, relpath)¶
Join relpath onto a local path or URL store root (URL-safe, unlike
Path).- Parameters:
store_root (str | pathlib.Path)
relpath (str)
- Return type:
- noether.data.zarr_store.stores.make_store(path, *, read_only=False)¶
Build a Zarr store for path.
Uses the Rust-backed
ObjectStorefors3://URLs when the optionalobstorepackage is installed,FsspecStorefor any other URL (or for S3 without obstore), andLocalStorefor local paths.- Parameters:
path (str | pathlib.Path)
read_only (bool)
- Return type:
zarr.abc.store.Store