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.0rc2.tar.gz
(342.6 kB
view hashes)
Built Distribution
Close
Hashes for pydantic_schemaorg-1.0.0rc2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e8dacceb725a3e91d289f87327133cc84e9a0b97f372fd98de889ef5d0a8ef |
|
MD5 | d86e0c28593c332b411aadc28b9248c2 |
|
BLAKE2b-256 | 432734c7f94958cd69c9d9cac6cb8b213aaed1b76320c117d12c4f61af512126 |
Close
Hashes for pydantic_schemaorg-1.0.0rc2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 522abe909f1a459de9f793743ef53df3f2ee173656db9c380244e7e575e258ef |
|
MD5 | 41b181cfab5243e251ee7d95f1a79b1f |
|
BLAKE2b-256 | 07285d019f27fb42d48b7017e78ff3846c9505e3c447ebff27c384d3a7d699c6 |