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

Uploaded Source

Built Distribution

zarr_checksum-0.2.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zarr_checksum-0.2.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1030-azure

File hashes

Hashes for zarr_checksum-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b8c21fb626c0ebb43dde9c37e64ac852cffe5a83589f907135719801f70b6f35
MD5 869a4c593d635d704f0b1cd7ac915a9e
BLAKE2b-256 1e73ddff4397a16f4e23bf1621d33a26813e36b147a0955555b77a293ffdc5b2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: zarr_checksum-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1030-azure

File hashes

Hashes for zarr_checksum-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c42e71c26131bcb2c722a05db24d28144db5eda8c6e2919216c7653bb3cb8129
MD5 5168143a37365741872e47b88ed99bf5
BLAKE2b-256 1a8a78dfeffefac51d9eb49621a5464ffcbe5311619847505262dc41e773c12e

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