Skip to main content

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


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)

Uploaded Source

Built Distribution

zarr_checksum-0.2.6-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

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

Hashes for zarr_checksum-0.2.6.tar.gz
Algorithm Hash digest
SHA256 e8647c6ce9d192fcc73a4a944bca03ebc4f0f213697f9801c1571d1a7b79ffeb
MD5 6f7c37cad501dcb857055dc094fa080e
BLAKE2b-256 2650266aa9d7c738790c023e18f0ed16f6b2be1a1e3bf2c94252b5e443de23e7

See more details on using hashes here.

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

Hashes for zarr_checksum-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 38878b894890a437efde9e595ce9321a1e6999058f97439e903811a233e82853
MD5 27ba30d17e4e4f4cb65f200c2a2dc22c
BLAKE2b-256 cf084fb98a980311b011e697586c54a22c2148a790ef22f57df861080a38ae3d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page