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.8
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-2021')
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-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
pydantic_schemaorg-1.0.6a0.tar.gz
(343.6 kB
view hashes)
Built Distribution
Close
Hashes for pydantic_schemaorg-1.0.6a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d768cce7a9570a8ee12a67a93fca4dcc34aa10f23e1947903e52675e37df7974 |
|
MD5 | f0870ee872061a8c530d2adb6ef20188 |
|
BLAKE2b-256 | eb8969abbce7c4bbc97edb137b2b6f68118fa5ece3cc93dee740434fe564811e |
Close
Hashes for pydantic_schemaorg-1.0.6a0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8302f67d2f27f1447ad6df8c47656e7a4f711d1cf629a93f9030d0452b63f760 |
|
MD5 | 040aca3031928275a24c1493b78bd616 |
|
BLAKE2b-256 | 169ab967e6218bfc70d32e40df0e89ad4251f9edd85f7aa6c7b97cd42ad0da7e |