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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metaschema-0.0.3.tar.gz | 10.8 kB | Without provenance | Details for metaschema-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metaschema-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for metaschema-0.0.3-py3-none-any.whl |
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
|
Security for metaschema 0.0.3
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.