Skip to main content

Pydantic classes for Schema.org

Project description

pydantic_schemaorg

PyPi version t

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


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.6.tar.gz (343.8 kB view details)

Uploaded Source

Built Distribution

pydantic_schemaorg-1.0.6-py2.py3-none-any.whl (842.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pydantic_schemaorg-1.0.6.tar.gz.

File metadata

  • Download URL: pydantic_schemaorg-1.0.6.tar.gz
  • Upload date:
  • Size: 343.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.10 Linux/5.4.0-1069-azure

File hashes

Hashes for pydantic_schemaorg-1.0.6.tar.gz
Algorithm Hash digest
SHA256 ce072a5fe9f08be781acbc45a3a33db1ec85150b7085beba90dfd75b14a9ab1f
MD5 8235719cc81859cc1d6d9f68bbbd45d6
BLAKE2b-256 3b94303527dc76ce0a0400ba0108239c40c4e4887eb14d653dd1bda42e41381a

See more details on using hashes here.

File details

Details for the file pydantic_schemaorg-1.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pydantic_schemaorg-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c07fff5ff78ae22d800d7d749ab0b043778e45798807fba3c2e33add2d324db
MD5 be2c5a3fffd638eda9f5496914d5f584
BLAKE2b-256 428ad69c2c43ea34d3b3cc276e9f287d41e83ab2da1b52ea2a241d2cfd5b36a0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page