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.4.1.tar.gz
(11.7 kB
view details)
Built Distribution
File details
Details for the file zarr_checksum-0.4.1.tar.gz
.
File metadata
- Download URL: zarr_checksum-0.4.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6879d3d8d9b15799983a5418bd8b46407fc16da42a1492643426407fd10a0653 |
|
MD5 | dc3125d31da2d7193ecaebf0faac56dc |
|
BLAKE2b-256 | 92069025ad2855693fb28725e46b9f5c10d8712c06e080364152644d16ac308e |
Provenance
File details
Details for the file zarr_checksum-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: zarr_checksum-0.4.1-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 830b15e6c1ac1d3420591549bdf0d77f937273724e5614299844a7546f715067 |
|
MD5 | 01d1d50e12221287f1965bb89be5ecec |
|
BLAKE2b-256 | 639e2b73480ef521c89f92927d8c7c954877156b66e903c721bf7397d364cee2 |