Skip to main content
zarr-lint

zarr-lint

Inspect, validate, and understand Zarr stores with fast structural, metadata, and compatibility checks. Built for scientific data and reproducible workflows.

What it does

zarr-lint points at a local Zarr store, recognizes Zarr v2 and v3 metadata, and reports structural and metadata problems as diagnostics — in human-readable text or JSON, with stable exit codes suitable for CI.

$ zarr-lint check images.zarr
error[array/rank-mismatch] temperature/.zarray
  Array shape rank (2) does not match chunk shape rank (1).

  Caused by:
    shape [4, 3], chunks [2]

1 finding(s): 1 error(s), 0 warning(s), 0 info.

Install

From PyPI (installs the zarr-lint command and a Python API):

pip install zarr-lint

From source with Cargo (requires Rust 1.82+):

cargo install --path crates/zarr-lint-cli

Or build the binary in-tree:

cargo build --release
# binary at target/release/zarr-lint

Usage

zarr-lint check <PATH>     Check a store (primary form)
zarr-lint <PATH>           Shorthand for `check`
zarr-lint inspect <PATH>   Print a summary of discovered groups and arrays
zarr-lint version          Print version (add --verbose for commit/profile)

Options for check:

--format text|json         Output format (default: text)
--fail-on warning|error|never
                           Severity at/above which findings fail (default: error)
--quiet                    Suppress the summary/success line (text output)

Examples

# Human-readable check
zarr-lint check path/to/store.zarr

# JSON for machines / CI
zarr-lint check --format json path/to/store.zarr

# Report problems but never fail the build
zarr-lint check --fail-on never path/to/store.zarr

# See what the linter discovered
zarr-lint inspect path/to/store.zarr

JSON output:

{
  "version": "0.0.1",
  "store": "images.zarr",
  "diagnostics": [
    {
      "rule": "array/rank-mismatch",
      "severity": "error",
      "path": "temperature/.zarray",
      "message": "Array shape rank (2) does not match chunk shape rank (1).",
      "detail": "shape [4, 3], chunks [2]"
    }
  ]
}

Python API

The PyPI package ships the same zarr-lint command plus a small Python API. The report matches the CLI's JSON schema:

import zarr_lint

zarr_lint.__version__          # "0.0.1"
report = zarr_lint.lint("images.zarr")
report["diagnostics"]          # list of {rule, severity, path, message, ...}
zarr_lint.rules()              # the built-in rule registry

Rules

zarr-lint checks the following rules, each reporting at error severity:

Rule What it detects
structure/unrecognized-store No recognizable Zarr metadata under the path.
metadata/invalid-json A metadata file is not valid JSON.
metadata/missing-required-field A required field is absent.
metadata/unsupported-format-version zarr_format is not 2 or 3.
structure/conflicting-node-type A path declares both array and group metadata.
array/rank-mismatch Shape rank differs from chunk-shape rank.

Details and per-rule fixtures: docs/rules.md.

Exit codes

Code Meaning
0 No findings reached the failure threshold.
1 Findings reached the failure threshold.
2 Invalid command usage or configuration.
3 Store access or internal execution failure.

Scope

zarr-lint reads store metadata — the .zgroup, .zarray, and zarr.json documents of Zarr v2 and v3 stores — and reports structural and metadata problems. It inspects metadata rather than reading or decoding chunk data, which keeps checks fast and lightweight. Coverage grows with each release; see the rules.

Stores can be local (a filesystem path) or remote over http(s)://, including public object stores reached through their HTTPS endpoints. Because HTTP has no directory listing, remote discovery uses the store's consolidated metadata (.zmetadata) when present, and otherwise reads the root node.

zarr-lint check path/to/store.zarr
zarr-lint check https://example.com/data.zarr
zarr-lint check https://bucket.s3.amazonaws.com/prefix/data.zarr

Native s3:// (and gs://, azure://) access with credentials is not yet supported; use the equivalent https:// URL for public data.

Development

cargo test --workspace          # unit + CLI integration tests
cargo fmt --all --check         # formatting
cargo clippy --all-targets --all-features -- -D warnings
python tools/check_versions.py  # version consistency
prek run --all-files            # all pre-commit hooks (or: pre-commit run)

The test corpus includes small, real stores written by zarr-python, xarray, and tensorstore (under test-data/generated/) to guard against false positives on mainstream tools. Regenerate them with:

uv run --with zarr --with xarray --with tensorstore tools/generate_fixtures.py

Documentation:

License

BSD 3-Clause. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zarr_lint-0.0.3.tar.gz (46.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zarr_lint-0.0.3-cp311-abi3-win_amd64.whl (5.0 MB view details)

Uploaded CPython 3.11+Windows x86-64

zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file zarr_lint-0.0.3.tar.gz.

File metadata

  • Download URL: zarr_lint-0.0.3.tar.gz
  • Upload date:
  • Size: 46.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zarr_lint-0.0.3.tar.gz
Algorithm Hash digest
SHA256 68d65a01aabe5af13e1d0a2b314aa40ecbe8c7b1be425a70f6c36e719d50aeb9
MD5 f363e582d6df5c9aa8d1f6e4656964de
BLAKE2b-256 55a6533825efd0d3c428935fcc1cdfff8e24b33ddd70e035a07a65a7c358927c

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3.tar.gz:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_lint-0.0.3-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: zarr_lint-0.0.3-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 5.0 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zarr_lint-0.0.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a765d08126933df8c4363e98de0e9dc5b5d3f075906c17f8d7eaa23fd10044cf
MD5 991a0023f1a777f25698eed1fe8bce7c
BLAKE2b-256 2a576bec05418b2bd661eb070fcfbb613f0df6d2eed854d1449492067e6c6486

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3-cp311-abi3-win_amd64.whl:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6cc8633bf6db866d139e49bc0f546a6958955b8906d1622914d0ac11b52acb9
MD5 80b91847b6532daa22323d095f448662
BLAKE2b-256 6ae584b04a1c52051968edec0df16c51197799124fe53b5c243926517c5eb45e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d1b61d12c0cccc2d5a38fc3c75659366c752228e88b85ba01c937dd289e7c5b5
MD5 1ec3c4a462efa8c5f7408df37e57643d
BLAKE2b-256 c9b2f8b9a4d017e6242fa5bcba53f61f1f2d4763e1249ca77447bc1d5eb41837

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b15d3cf1dc48af3cae66c36c170a62c2d65e47753d8a732d393f4ac3a9541d9b
MD5 8b7193edb45131ec523a5738a5c85281
BLAKE2b-256 ef37c016b5e529710ca60c31636ed48159815ea48ff7287e5b8d544abe8cc154

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aa49d1a5a30e62441c1a0fb465c3661248cabccab4a648222991afd6144666f8
MD5 556370927782e879bd4967a898ab85d1
BLAKE2b-256 19f6fe774991dd5ab299ccf4456ccb1c8467b6b4fd955ffefcd2c76565daa833

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on d33bs/zarr-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page