Python implementation of Zarr Conventions Metadata
Project description
zarr-cm
Python types and utilities for Zarr Conventions Metadata.
Overview
zarr-cm provides typed Python support for the published Zarr conventions:
| Convention | Module | Description |
|---|---|---|
| geo-proj | zarr_cm.geo_proj |
Coordinate reference system information |
| spatial | zarr_cm.spatial |
Spatial coordinate metadata |
| multiscales | zarr_cm.multiscales |
Multiscale pyramid layout |
| license | zarr_cm.license |
License specifiers |
| uom | zarr_cm.uom |
Units of measurement |
Each module provides:
- TypedDict types for convention-specific metadata
create— create convention metadatainsert— add convention metadata to a Zarr attributes dictextract— remove and return convention metadata from an attributes dictvalidate— check runtime invariants the type system cannot express
Installation
pip install zarr-cm
Usage
from zarr_cm import geo_proj
# Create convention metadata
data = geo_proj.create(code="EPSG:4326")
print(data)
#> {'proj:code': 'EPSG:4326'}
# Validate
print(geo_proj.validate({"proj:code": "EPSG:4326"}))
#> {'proj:code': 'EPSG:4326'}
# Insert into an attributes dict
attrs = {"foo": "bar"}
result = geo_proj.insert(attrs, data)
print(result)
"""
{
'foo': 'bar',
'proj:code': 'EPSG:4326',
'zarr_conventions': [
{
'uuid': 'f17cb550-5864-4468-aeb7-f3180cfb622f',
'schema_url': 'https://raw.githubusercontent.com/zarr-experimental/geo-proj/refs/tags/v1/schema.json',
'spec_url': 'https://github.com/zarr-experimental/geo-proj/blob/v1/README.md',
'name': 'proj:',
'description': 'Coordinate reference system information for geospatial data',
}
],
}
"""
# Extract it back out
remaining, extracted = geo_proj.extract(result)
print(remaining)
#> {'foo': 'bar'}
print(extracted)
#> {'proj:code': 'EPSG:4326'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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_cm-0.2.0.tar.gz.
File metadata
- Download URL: zarr_cm-0.2.0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
737f5b181e8a2456643c423f49b59d879531498c13c7345860f0e718ef73d8a8
|
|
| MD5 |
eb282aca34a1b5649c0b4008e76a90a9
|
|
| BLAKE2b-256 |
d84099c941d23a7cd84fb194b3eaa2ca2d0d85f5135aa07e2c4f2c12febfef43
|
Provenance
The following attestation bundles were made for zarr_cm-0.2.0.tar.gz:
Publisher:
cd.yml on zarr-conventions/zarr-cm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_cm-0.2.0.tar.gz -
Subject digest:
737f5b181e8a2456643c423f49b59d879531498c13c7345860f0e718ef73d8a8 - Sigstore transparency entry: 924326447
- Sigstore integration time:
-
Permalink:
zarr-conventions/zarr-cm@d06fada9d3481f89b4021adcd2d18ab635cd81a3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zarr-conventions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@d06fada9d3481f89b4021adcd2d18ab635cd81a3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zarr_cm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: zarr_cm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f4c778d70d37ccb6e10e1509f4c0a488689027dcebcd6b64fa89a899f101e11
|
|
| MD5 |
750a32a64c02b89fe11f108131d8c7c0
|
|
| BLAKE2b-256 |
546006c371c10a321db63ec46634c9498a3c491754214c0e3bfc27410c528d99
|
Provenance
The following attestation bundles were made for zarr_cm-0.2.0-py3-none-any.whl:
Publisher:
cd.yml on zarr-conventions/zarr-cm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zarr_cm-0.2.0-py3-none-any.whl -
Subject digest:
7f4c778d70d37ccb6e10e1509f4c0a488689027dcebcd6b64fa89a899f101e11 - Sigstore transparency entry: 924326449
- Sigstore integration time:
-
Permalink:
zarr-conventions/zarr-cm@d06fada9d3481f89b4021adcd2d18ab635cd81a3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zarr-conventions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@d06fada9d3481f89b4021adcd2d18ab635cd81a3 -
Trigger Event:
release
-
Statement type: