Pydantic classes for Schema.org
Project description
pydantic_schemaorg
Use Schema.org types in pydantic!
Pydantic_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.7 since the library uses __future__.annotations
How to install
pip install pydantic_schemaorg
Import any class you want to use by with the following convention
from pydantic_schemaorg.<SCHEMAORG_MODEL_NAME> import <SCHEMAORG_MODEL_NAME>
A full (hierarchical) list of Schema.org model names can be found here
Example usages
from pydantic_schemaorg.ScholarlyArticle import ScholarlyArticle
scholarly_article = ScholarlyArticle(url='https://github.com/lexiq-legal/pydantic_schemaorg',
sameAs='https://github.com/lexiq-legal/pydantic_schemaorg',
copyrightNotice='Free to use under the MIT license',
dateCreated='15-12-2012')
print(scholarly_article.json())
{"@type": "ScholarlyArticle", "url": "https://github.com/lexiq-legal/pydantic_schemaorg", "sameAs": "https://github.com/lexiq-legal/pydantic_schemaorg", "copyrightNotice": "Free to use under the MIT license", "dateCreated": "15-12-2012"}
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
pydantic_schemaorg-1.0.0rc0.tar.gz
(342.6 kB
view hashes)
Built Distribution
Close
Hashes for pydantic_schemaorg-1.0.0rc0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204c1ea9898fbb84b2ddbdd7d0ad4aad2c556c86ce1058414d8a04fbb306807e |
|
MD5 | cc0246d0e9d884b0908082361af65e71 |
|
BLAKE2b-256 | f63b4d4504110dbcb9d84c0b2c1662795bb720122572063cbb00810175fa2061 |
Close
Hashes for pydantic_schemaorg-1.0.0rc0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17184ffbf071a22528ab15adf161f748f031c21ae4ec734067f1d3701ba73cc2 |
|
MD5 | ea9558e5ccad460be5170c773b4701c3 |
|
BLAKE2b-256 | 5af9a8e74e932773ab5454ac37623b95205efef16a1853e2aaf894592878e0f6 |