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 calculate 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.11.tar.gz
(11.6 kB
view details)
Built Distribution
File details
Details for the file zarr_checksum-0.2.11.tar.gz
.
File metadata
- Download URL: zarr_checksum-0.2.11.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da1f70e956fa8ca120e31d3c94da8cfd61802acc6e03e1cc4e9dffa2918cbd5 |
|
MD5 | 26cbbc2f839eb358ac36d79ebfc9817a |
|
BLAKE2b-256 | 356b73e2e1d6f823ae4456af59b10901c8114ce779ab60cd1e753373c1c2d7c8 |
Provenance
File details
Details for the file zarr_checksum-0.2.11-py3-none-any.whl
.
File metadata
- Download URL: zarr_checksum-0.2.11-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/6.2.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 870fca1466e4a68e98f03a83669bbf4e7da8df198e292796567c72957f7de84a |
|
MD5 | 49a4d7ed54e36a26c32a22ad5464608d |
|
BLAKE2b-256 | ae46cd42489275ffd6d25f07f4bdb9fb58f1705476fd47fa04d0a5abb2ceb86e |