Skip to main content

Pydantic classes for Schema.org

Project description

pydantic2_schemaorg

PyPi version

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


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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydantic2_schemaorg-0.3.0-py3-none-any.whl (910.4 kB view details)

Uploaded Python 3

File details

Details for the file pydantic2_schemaorg-0.3.0.tar.gz.

File metadata

  • Download URL: pydantic2_schemaorg-0.3.0.tar.gz
  • Upload date:
  • Size: 345.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pydantic2_schemaorg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8b11b3809bd5b26788520182a1b642861c1ea69d2df00ae8d8984ed1249aba47
MD5 2e91faaba9d0cab71f6407f5ac68652f
BLAKE2b-256 2d6521fce94d6db9e15ae0e2a31de72921682662b03a084d8a8f0d86537ddb46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantic2_schemaorg-0.3.0.tar.gz:

Publisher: publish.yml on blurry-dev/pydantic2-schemaorg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydantic2_schemaorg-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydantic2_schemaorg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e8f51cd9ffaaa059a31c064cb3119328b7dd07203b7a18c040f2bfb76cee371
MD5 d3dcf163d7efde4572796b151efd48e0
BLAKE2b-256 dd673521f38745efb177b89185a94bde34eddfa8e4e5066db0cc46ff45db173d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantic2_schemaorg-0.3.0-py3-none-any.whl:

Publisher: publish.yml on blurry-dev/pydantic2-schemaorg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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