Skip to main content

Pydantic models for schema.org

PyPI

Schema.org is a community-driven vocabulary that allows users to add structured data to content on the web. It's used by webmasters to help search engines understand web pages. Knowledge graphs such as yago also use schema.org to enforce semantics on wikidata.

Pydantic is the most widely used data validation library for Python.

This project includes a script that converts the schema defined in N-Triples(nt) format into a pydantic object. These objects can be used to validate any input data for conformance.

The inheritance hierarchy of the schema is accurately reflected in the python inheritance hierarchy.

Usage:

wget https://schema.org/version/latest/schemaorg-all-https.nt
./create_pydantic.py schemaorg-all-https.nt
pytest

One time setup:

pre-commit install

Schemas are provided under the following license.

Metadata

Release files for schema-org-python 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schema-org-python 0.1.1
File Size Uploaded
schema_org_python-0.1.1.tar.gz 148.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for schema-org-python 0.1.1
File Interpreter ABI Platform
schema_org_python-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 546.0 kB

Release files / schema_org_python-0.1.1.tar.gz

Download URL schema_org_python-0.1.1.tar.gz
Size 148.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8c5c617405338f51a698c3ce355c9c44aa031059f5580352209398c60c0ea117
BLAKE2b-256 checksum
How to use checksums
320390a34561e2cb17bcde4cef7217cfdb1277a8a0dfb269e6eaedf7ba3125be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / schema_org_python-0.1.1-py3-none-any.whl

Download URL schema_org_python-0.1.1-py3-none-any.whl
Size 397.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7faca8aca7b6ad2cfc120dc599c2577009b4a976dc8139f0f60a84e0effb427b
BLAKE2b-256 checksum
How to use checksums
53daba85485cec06eb8c7087a0c5c7b1f72f338778924f323902279a4b34e1f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page