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 local 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 dependency-free. Coverage grows with each release; see the
rules.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zarr_lint-0.0.1.tar.gz.
File metadata
- Download URL: zarr_lint-0.0.1.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab28583b8f2a77d9ce9638b28068f5070720524c81d4f86539e7230e7c6b4572
|
|
| MD5 |
062746f37b9efc6576d2f6dba8da48c2
|
|
| BLAKE2b-256 |
8421b5bdcf2b11543306d65f4476282f1e29d429685ae197c7b1465223fd3343
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1.tar.gz:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1.tar.gz -
Subject digest:
ab28583b8f2a77d9ce9638b28068f5070720524c81d4f86539e7230e7c6b4572 - Sigstore transparency entry: 2341518668
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_lint-0.0.1-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: zarr_lint-0.0.1-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 443.1 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd6baf3ac659206c596b852d301aa996f33027406f6f35a76432417a8492ac00
|
|
| MD5 |
ddb5a1eea245985877d433dc3dc1c0d9
|
|
| BLAKE2b-256 |
7c0c82d73fdfd8544bd07500d7d697dd54fef04c736fde501a06aa4c35118b07
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1-cp311-abi3-win_amd64.whl:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1-cp311-abi3-win_amd64.whl -
Subject digest:
bd6baf3ac659206c596b852d301aa996f33027406f6f35a76432417a8492ac00 - Sigstore transparency entry: 2341518852
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 601.2 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e98f3e61ecb70596caa7698e687e9faa271acd75e062b4a3f6c338a9891f18d
|
|
| MD5 |
b7f4e6efbe3faa2cd9f9856e70dedf56
|
|
| BLAKE2b-256 |
8c94ec3072dae58bd56853da00e2ef916b2ac0b6e081275fec22f81a33aa0136
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
2e98f3e61ecb70596caa7698e687e9faa271acd75e062b4a3f6c338a9891f18d - Sigstore transparency entry: 2341518746
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 577.9 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29b57e1128b8bf22435af90694a869881cdd1461040caf1d082c7e72a22fbb2d
|
|
| MD5 |
af2f34d631d11546a25a29b5efa150c5
|
|
| BLAKE2b-256 |
762ff14a7df4fcc278c03f84a99de6572f63b8ccd736505038f4632550fa0bed
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
29b57e1128b8bf22435af90694a869881cdd1461040caf1d082c7e72a22fbb2d - Sigstore transparency entry: 2341518779
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_lint-0.0.1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: zarr_lint-0.0.1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 534.0 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae1642fef7507cf82118f1f1707ef0a9face12358b7ef7bad52a7ee8244a596
|
|
| MD5 |
f32656605297853d0938cceb659569c5
|
|
| BLAKE2b-256 |
cbfb1d2da8611277b3dce0b550cb15cfa259fe877bd726fe79e7fbbfe6614caa
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
2ae1642fef7507cf82118f1f1707ef0a9face12358b7ef7bad52a7ee8244a596 - Sigstore transparency entry: 2341518811
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_lint-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: zarr_lint-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 555.4 kB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
332a1a5e73f667cc8c4450c94e0cc60fb9d254a4561170de7c7576b32d42a9b9
|
|
| MD5 |
f9eb86e9662d139e70a2c6a328be69cd
|
|
| BLAKE2b-256 |
9f4a0f1823e0b1c66537f9070514ed431fc760aa2f1b1b095a824f7c20790930
|
Provenance
The following attestation bundles were made for zarr_lint-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-pypi.yml on d33bs/zarr-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_lint-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl -
Subject digest:
332a1a5e73f667cc8c4450c94e0cc60fb9d254a4561170de7c7576b32d42a9b9 - Sigstore transparency entry: 2341518709
- Sigstore integration time:
-
Permalink:
d33bs/zarr-lint@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/d33bs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@974ad7cb54fdc71c7ab78c9e946440f506efc230 -
Trigger Event:
release
-
Statement type: