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:
- docs/architecture.md — pipeline, crates, and model.
- docs/rules.md — the rule set and fixtures.
- docs/versioning.md — the dynamic versioning model.
- docs/test-corpus.md — fixture provenance.
License
BSD 3-Clause. See LICENSE.
Metadata
Release files for zarr-lint 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zarr_lint-0.0.3.tar.gz | 46.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| zarr_lint-0.0.3-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 27.0 MB
Release files / zarr_lint-0.0.3.tar.gz
| Download URL | zarr_lint-0.0.3.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68d65a01aabe5af13e1d0a2b314aa40ecbe8c7b1be425a70f6c36e719d50aeb9
|
|
BLAKE2b-256 checksum How to use checksums |
55a6533825efd0d3c428935fcc1cdfff8e24b33ddd70e035a07a65a7c358927c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / zarr_lint-0.0.3-cp311-abi3-win_amd64.whl
| Download URL | zarr_lint-0.0.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a765d08126933df8c4363e98de0e9dc5b5d3f075906c17f8d7eaa23fd10044cf
|
|
BLAKE2b-256 checksum How to use checksums |
2a576bec05418b2bd661eb070fcfbb613f0df6d2eed854d1449492067e6c6486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f6cc8633bf6db866d139e49bc0f546a6958955b8906d1622914d0ac11b52acb9
|
|
BLAKE2b-256 checksum How to use checksums |
6ae584b04a1c52051968edec0df16c51197799124fe53b5c243926517c5eb45e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | zarr_lint-0.0.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d1b61d12c0cccc2d5a38fc3c75659366c752228e88b85ba01c937dd289e7c5b5
|
|
BLAKE2b-256 checksum How to use checksums |
c9b2f8b9a4d017e6242fa5bcba53f61f1f2d4763e1249ca77447bc1d5eb41837
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | zarr_lint-0.0.3-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.7 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b15d3cf1dc48af3cae66c36c170a62c2d65e47753d8a732d393f4ac3a9541d9b
|
|
BLAKE2b-256 checksum How to use checksums |
ef37c016b5e529710ca60c31636ed48159815ea48ff7287e5b8d544abe8cc154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | zarr_lint-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
aa49d1a5a30e62441c1a0fb465c3661248cabccab4a648222991afd6144666f8
|
|
BLAKE2b-256 checksum How to use checksums |
19f6fe774991dd5ab299ccf4456ccb1c8467b6b4fd955ffefcd2c76565daa833
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log