dandi-schema
is a Python library for maintaining and managing DANDI metadata models and schemas.
pip install dandischema
DANDI — the Distributed Archives for
Neurophysiology Data Integration — is a BRAIN Initiative-supported platform
for publishing, sharing, and processing cellular neurophysiology data.
Every Dandiset
or associated asset is described by a structured metadata object that can be
retrieved through the DANDI API. The dandi-schema
library provides Python data models
and helper utilities to create, validate, migrate, and manage these metadata objects.
It uses Pydantic models to define metadata
models, and the JSON Schema schemas corresponding to the Pydantic models are generated,
versioned, and stored in the dandi/schema repository
with an associated context.json
file for JSON-LD compliance. Both representations
of the metadata models — the Pydantic models and their corresponding JSON Schema schemas —
are used across the DANDI ecosystem (see the
dedicated section in DANDI Docs
for integration details). Additionally, this library provides tools for converting
Dandiset metadata to DataCite metadata for DOI generation.
Important files in this repository include:
- models.py - contains the Pydantic models defining the metadata models
- metadata.py - contains functions for validating, migrating, and aggregating metadata
- datacite package - contains functions for converting Dandiset metadata to DataCite metadata
- To learn how to interact with the DANDI archive, see the DANDI Docs.
- To file a feature request or bug report, go to https://github.com/dandi/helpdesk/issues/new/choose.
- For all other issues, contact the DANDI team: [email protected].