Pydantic classes for Schema.org
Project description
pydantic2_schemaorg
Use Schema.org types in pydantic!
pydantic2_schemaorg contains all the models defined by schema.org. The pydantic classes are auto-generated from the schema.org model definitions that can be found on https://schema.org/version/latest/schemaorg-current-https.jsonld
Requirements
Works with python >= 3.10
How to install
pip install pydantic2-schemaorg
Import any class you want to use by with the following convention
from pydantic2_schemaorg.<SCHEMAORG_MODEL_NAME> import <SCHEMAORG_MODEL_NAME>
A full (hierarchical) list of Schema.org model names can be found here
Example usages
from pydantic2_schemaorg.ScholarlyArticle import ScholarlyArticle
scholarly_article = ScholarlyArticle(
url='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',
sameAs='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',
copyrightNotice='Free to use under the MIT license',
dateCreated='15-12-2021'
)
print(scholarly_article.json())
{"@type": "ScholarlyArticle", "url": "https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg", "sameAs": "https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg", "copyrightNotice": "Free to use under the MIT license", "dateCreated": "15-12-2021"}
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
pydantic2_schemaorg-0.1.0.tar.gz
(373.2 kB
view hashes)
Built Distribution
Close
Hashes for pydantic2_schemaorg-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd802e3bdb250efe7746aa5c94f88367431bc226d5f887fe41e21954a61fd9f7 |
|
MD5 | e2fb7a58f4b8ac43f6f4982b44b05e7b |
|
BLAKE2b-256 | e20fbf4cbb8e02a3932d559c9c3ae81a7dc7934e0ed08ce2d6a874e4f5c7b599 |
Close
Hashes for pydantic2_schemaorg-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcd1aa52117443a067f306947bbc829aeb03d46d6c83b8d844ae82388a32c1a6 |
|
MD5 | dea8dc4c3989fb524fe76151b4d42c33 |
|
BLAKE2b-256 | 08a3fc06130da7fb53fe6c8262e2f804d0f2d0f38e2d3f8f115db720c4aea551 |