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.3.0.tar.gz
(11.7 kB
view details)
Built Distribution
File details
Details for the file zarr_checksum-0.3.0.tar.gz
.
File metadata
- Download URL: zarr_checksum-0.3.0.tar.gz
- Upload date:
- Size: 11.7 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 | 55869db06242396f64174fd86aa814bfe84a397962b08acf80b70f63d973b3cd |
|
MD5 | 68a6f9d89403b07aa6167e7db1eb30ef |
|
BLAKE2b-256 | 2c659aa40f0574014c5e57332f1e5d5a24a2588e847307f3138a164aff607fca |
Provenance
File details
Details for the file zarr_checksum-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: zarr_checksum-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.7 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 | ed6a038cdfa067b5786687d9e49bbe0e1f469c484307bf850090bf152e19ff24 |
|
MD5 | 292642d4c109124cd4e1d505e7ff42a7 |
|
BLAKE2b-256 | 7cbbaeb8d979cfb1e4298711e9b8623ff569048ef3d189454e15f78c86411702 |