Read only Zarr storage
Project description
sferriol-zarr
sferriol-zarr is a module with new zarr storage class TarStore (only read-only).
It also has the create_store shortcut that returns the store corresponding to the specified url
Installation
pip install git+https://gitlab.in2p3.fr/sferriol-ip2i/sferriol-zarr.git
TarStore Usage
import zarr
import sferriol.zarr
# original zarr storage
dir_store = zarr.DirectoryStore('data/example.zarr')
z = zarr.create(store=dir_store, overwrite=True, shape=1000000, dtype='i4')
# convert it to tar file ('data/example.zarr.tar')
tar_fpath = sferriol.zarr.create_tar('data/example.zarr')
# now use TarStore
tar_store = sferriol.zarr.TarStore('data/example.zarr.tar')
tz = zarr.open(store=tar_store, mode='r')
tar_store.close() # don't forget to call this when you're done
# or in a with statement
with sferriol.zarr.TarStore('data/example.zarr.tar') as tar_store:
tz = zarr.open(store=tar_store, mode='r')
create_store Usage
from sferriol.zarr import create_store
# local storage
store = create_store('/.../my_data.zarr')
store = create_store('/.../my_data.zarr.tar')
store = create_store('/.../my_data.zarr.zip')
# xrootd storage
store = create_store('root://host:port///.../my_data.zarr')
store = create_store('root://host:port///.../my_data.zarr.tar')
store = create_store('root://host:port///.../my_data.zarr.zip')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sferriol_zarr-0.4.0-py3-none-any.whl.
File metadata
- Download URL: sferriol_zarr-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91c7f0e3c2befe4d9b3f34fe4d4f11652e88af700712153fabfeb599aad05da
|
|
| MD5 |
8b5ee70e975ca1b8197152c7476eaeb4
|
|
| BLAKE2b-256 |
a6dcf4626cdf14c5df56e41e55f3a810b246336cc4758773ffe7977f8bb42ca8
|