| title | API reference |
|---|
The package is organized to mirror the structure of the Zarr specifications:
zarr_metadata.model— frozen-dataclass document models, structural validators, loc-aware parsers, and theUNSETsentinelzarr_metadata.rules— composition rules: cross-field judgments over full documents (fill value vs. data type, codec pipeline ordering, chunk geometry), plus whole-documentvalidate/is/parsetrios combining structure and compositionzarr_metadata.builder— validated construction: one-shotcreate_*factories, one per document typezarr_metadata.pydantic— optional Pydantic field types over the modelszarr_metadata.v2—TypedDictshapes for Zarr v2 documents (.zarray,.zgroup,.zattrs,.zmetadata)zarr_metadata.v3—TypedDictshapes for Zarr v3 documents, with subpackages for chunk grids, chunk key encodings, codecs, and data types
The document types, models, and spec vocabulary — including the store keys —
are re-exported at the top level, so
from zarr_metadata import ZarrV3ArrayMetadataJSON and
from zarr_metadata.v3.array import ZarrV3ArrayMetadataJSON are equivalent.
The model layer's validators, parsers, type guards, and metadata key sets are
imported from zarr_metadata.model directly.
A few cross-cutting aliases are exported only from the top-level
zarr_metadata namespace:
::: zarr_metadata.JSONValue
::: zarr_metadata.ZarrV3NamedConfigJSON