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.6.tar.gz
(11.8 kB
view details)
Built Distribution
File details
Details for the file zarr_checksum-0.2.6.tar.gz
.
File metadata
- Download URL: zarr_checksum-0.2.6.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8647c6ce9d192fcc73a4a944bca03ebc4f0f213697f9801c1571d1a7b79ffeb |
|
MD5 | 6f7c37cad501dcb857055dc094fa080e |
|
BLAKE2b-256 | 2650266aa9d7c738790c023e18f0ed16f6b2be1a1e3bf2c94252b5e443de23e7 |
Provenance
File details
Details for the file zarr_checksum-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: zarr_checksum-0.2.6-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38878b894890a437efde9e595ce9321a1e6999058f97439e903811a233e82853 |
|
MD5 | 27ba30d17e4e4f4cb65f200c2a2dc22c |
|
BLAKE2b-256 | cf084fb98a980311b011e697586c54a22c2148a790ef22f57df861080a38ae3d |