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.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

zarr_checksum-0.2.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file zarr_checksum-0.2.2.tar.gz.

File metadata

  • Download URL: zarr_checksum-0.2.2.tar.gz
  • Upload date:
  • Size: 7.9 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.2.tar.gz
Algorithm Hash digest
SHA256 af0c7206aebf9964860e2b2461abeffec12b5577a4b42c2e631d28230ded21a3
MD5 9724e0397ee60703b2ae6f6f9b38f416
BLAKE2b-256 1fc5027a6e6d118cd8c05afa5c9acd30509123ed606482eb580148196068353e

See more details on using hashes here.

Provenance

File details

Details for the file zarr_checksum-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: zarr_checksum-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb05916f603a90b296e54764a403deebef3b7cd1168ad40bf942fca0c9169968
MD5 f7c957c4c3d0b98d7c32ac7e3a71d189
BLAKE2b-256 5410ec17e638f101bd72d227ffaaa1eefd8bf41084b8f7aa900ce0699c7971be

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