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

Uploaded Source

Built Distribution

pydantic_schemaorg-1.0.2-py2.py3-none-any.whl (823.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pydantic_schemaorg-1.0.2.tar.gz
  • Upload date:
  • Size: 343.2 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.2.tar.gz
Algorithm Hash digest
SHA256 543e04dc48742dbddba22e4cf0960f70bc99cc3029505f7c28b20f5cd80caeda
MD5 f33ed642f8770cb9720d2978b97014e8
BLAKE2b-256 405b18a616fd203b7a18d3da729711509e92891ff84196863987761898e1c0a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydantic_schemaorg-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 146702ced6900948d090064a75a6df12efe861033b67b73608b890e8e84a3951
MD5 1aa34af9a3e23ad3c7c18f8eb6c43320
BLAKE2b-256 5f2a4c6bfed813c64abe34fe6d98a3c6e3587da89939ec01d157b5ce5b24d542

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