DANDI Schema
dandi-schema is a Python library for maintaining and managing DANDI metadata models and schemas.
Installation
pip install dandischema
Description
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
Customization with Vendor Information
The DANDI metadata models defined in this library can be customized with vendor-specific information.
The parameters of the customization are defined by the fields of the Config class in
dandischema/conf.py. The Config class is a subclass of
pydantic_settings.BaseSettings,
and the values of the fields in an instance of the Config class can be set through environment
variables and .env files, as documented in
the Pydantic Settings documentation.
Specifically,
- The value of a field is set from an environment variable with the same name, case-insensitively,
as one of the aliases of the field. For example, the
instance_namefield can be set from theDANDI_INSTANCE_NAMEorDJANGO_DANDI_INSTANCE_NAMEenvironment variable. - A value of a complex type (e.g.,
list,set,dict) should be expressed as a JSON-encoded string in an environment variable. For example, the value for thelicensesfield, which is of typeset, can be set from theDANDI_LICENSESenvironment variable defined as the following:export DANDI_LICENSES='["spdx:CC0-1.0", "spdx:CC-BY-4.0"]'
Resources
- 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: help@dandiarchive.org.
Metadata
Release files for dandischema 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dandischema-0.14.0.tar.gz | 102.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dandischema-0.14.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 224.4 kB
Release files / dandischema-0.14.0.tar.gz
| Download URL | dandischema-0.14.0.tar.gz |
|---|---|
| Size | 102.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
963af71311c356bce99c4e056754f3a2bd1a4f33836f13d9197c399c7732176f
|
|
BLAKE2b-256 checksum How to use checksums |
d9e655c462074cb9106b553c53bc83b66b98a487ee32e154acbbe34b98c1fd9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / dandischema-0.14.0-py3-none-any.whl
| Download URL | dandischema-0.14.0-py3-none-any.whl |
|---|---|
| Size | 122.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fce0c6c9df5b9504a230ba44d623656f4a798507f47fc3c9b0777cda016fbb73
|
|
BLAKE2b-256 checksum How to use checksums |
a8b50f0828a19e023ccf5535b69d434611a7cfd17fed88bc1eca7c836339c908
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Security for dandischema 0.14.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.