Skip to main content

Meta Schema

This library contains the Pydantic models for the metadata schema standard outlined in this Schema Guide.

The pydantic models for each data type will allow for an easy conversion across JSON, dict, and Python-objects (Pydantic model). Additionally, the metadata is also automatically validated using the expected field types to guarantee that the metadata is consistent.

Install

The package is available on PyPi:

pip install metaschema

Notes

Generating the models from the JSON schema. This is done using the datamodel-codegen.

First, download the JSON schema from NADA API. For example, for documents (https://ihsn.github.io/nada-api-redoc/catalog-admin/#tag/Documents). Store the JSON schema in data/examples/doc.json.

Then, run the following command to generate the models. Note that the --input-file-type is json and not jsonschema

poetry run datamodel-codegen  --input data/examples/doc.json --input-file-type json --output src/metaschema/doc.py

We then change the Model to a more explicit name: DocModel .

Metadata

Release files for metaschema 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaschema 0.0.3
File Size Uploaded
metaschema-0.0.3.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaschema 0.0.3
File Interpreter ABI Platform
metaschema-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / metaschema-0.0.3.tar.gz

Download URL metaschema-0.0.3.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0628336ed1b614d737ef40d3e16b40dbda4aea16bf53985c7a798aa7aff9b38e
BLAKE2b-256 checksum
How to use checksums
b264ca0eec72d4e53ac646e474081c8e02a69e38cbed9bf614b359c83a55c2ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Darwin/22.5.0

Release files / metaschema-0.0.3-py3-none-any.whl

Download URL metaschema-0.0.3-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b69bd78aecee2aa3cb66a8eedc446cd059d69f975b988c330837fa75ea4dadf5
BLAKE2b-256 checksum
How to use checksums
895403ff2b74affb1f119492c085db13e69c77e93754f4db749bf4b420289b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Darwin/22.5.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page