Metadata-Version: 2.5
Name: zarr-metadata
Version: 0.7.0
Summary: Spec-defined metadata types, models, and validators for Zarr v2 and v3.
Project-URL: Homepage, https://github.com/zarr-developers/zarr-python
Project-URL: Source, https://github.com/zarr-developers/zarr-python/tree/main/packages/zarr-metadata
Project-URL: Issues, https://github.com/zarr-developers/zarr-python/issues
Project-URL: Changelog, https://github.com/zarr-developers/zarr-python/blob/main/packages/zarr-metadata/CHANGELOG.md
Project-URL: Documentation, https://zarr-metadata.readthedocs.io/
Author-email: Davis Bennett <davis.v.bennett@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: zarr
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: annotated-types>=0.6
Requires-Dist: typing-extensions>=4.16
Provides-Extra: testing
Requires-Dist: hypothesis>=6.85; extra == 'testing'
Description-Content-Type: text/markdown

# zarr-metadata

[![PyPI](https://img.shields.io/pypi/v/zarr-metadata)](https://pypi.org/project/zarr-metadata/)
[![Docs](https://img.shields.io/badge/docs-readthedocs-blue)](https://zarr-metadata.readthedocs.io/)

Types, models and validators for Zarr metadata documents, with minimal
dependencies.

`zarr-metadata` is developed in the
[zarr-python repository](https://github.com/zarr-developers/zarr-python/tree/main/packages/zarr-metadata)
and released independently of `zarr`. Install it with:

```
pip install zarr-metadata
```

## What this is

A collection of data structures and routines that closely model the
metadata rules in the Zarr v2 and v3 specifications and in zarr-extensions:

- `TypedDict` shapes for every document and configuration.
- Immutable document models. Their readers report every problem at its
  location.
- **Contexts**, which say exactly which codecs, data types and other
  extensions a program reads.

This is *not* a full Zarr implementation. Nothing here reads or writes
chunks, encodes or decodes data, or performs store I/O.

```python test="true" session="readme"
import json
from zarr_metadata import ZarrV3ArrayMetadata

with open("zarr.json", "rb") as f:
    raw = json.load(f)

metadata = ZarrV3ArrayMetadata.from_json(raw)
```

`from_json` returns the model, or raises `MetadataValidationError` with
every problem it found. The
[documentation](https://zarr-metadata.readthedocs.io/) has a guide for
each kind of use, and the API reference.

## License

[MIT](https://github.com/zarr-developers/zarr-python/blob/main/packages/zarr-metadata/LICENSE.txt)
