Checksum support for zarrs stored in various backends
Project description
zarr_checksum
Algorithms for calculating a zarr checksum against local or cloud storage
Install
pip install zarr-checksum
Usage
CLI
To calculate the checksum for a local zarr archive
zarrsum local <directory>
To calcuate the checksum for a remote (S3) zarr archive
zarrsum remote s3://your_bucket/prefix_to_zarr
Python
To calculate the checksum for a local zarr archive
from zarr_checksum import compute_zarr_checksum
from zarr_checksum.generators import yield_files_local, yield_files_s3
# Local
checksum = compute_zarr_checksum(yield_files_local("local_path"))
# Remote
checksum = compute_zarr_checksum(
yield_files_s3(
bucket="your_bucket",
prefix="prefix_to_zarr",
# Credentials can also be passed via environment variables
credentials={
aws_access_key_id: "youraccesskey",
aws_secret_access_key: "yoursecretkey",
region_name: "us-east-1",
}
)
)
Access checksum information
>>> checksum.digest
'c228464f432c4376f0de6ddaea32650c-37481--38757151179'
>>> checksum.md5
'c228464f432c4376f0de6ddaea32650c'
>>> checksum.count
37481
>>> checksum.size
38757151179
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zarr_checksum-0.2.9.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for zarr_checksum-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a218f53a6a1ae4ba57b52306a4ec16de6b8aec14e7a7059c4a01b2ac1eed9209 |
|
MD5 | 68eb8f10ef2b010c87753144df6a5fa4 |
|
BLAKE2b-256 | 94525b51779f64d6171a99cbe04ad9f84fa7334da5b273e31bb31bf52ae2b1d1 |