Skip to main content

Read only Zarr storage class using a Tar file

Project description

sferriol-zarr

sferriol-zarr is a module with new zarr storage class TarStore (only read-only).

Installation

pip install git+https://gitlab.in2p3.fr/sferriol-ip2i/sferriol-zarr.git

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')

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

sferriol_zarr-0.2.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file sferriol_zarr-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sferriol_zarr-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 075fd1d9e6c949406989e1a5fa46f5c7fc8ecfecf4d6d58fa1cf8d0768fd264b
MD5 ae46ff1d2ce6ea57997a06e89a7cd3eb
BLAKE2b-256 7afe9535992109d5b1e5cd4a94f633ada296da82c9056c858c3a2eb88c8b15a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page