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:

curl -LO https://schema.org/version/latest/schemaorg-all-https.nt
uv run 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.2

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.2
File Size Uploaded
schema_org_python-0.1.2.tar.gz 539.5 kB Details

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / schema_org_python-0.1.2.tar.gz

Download URL schema_org_python-0.1.2.tar.gz
Size 539.5 kB
Tags Source
SHA-256 checksum
How to use checksums
98ec3fc83df58100e7e5c3af2c862d33068d336eef4bd605a1f7f32f5cc9a5f6
BLAKE2b-256 checksum
How to use checksums
71c989b6441722d1ea0dcc59dc6e0d0ab4bcc379aefc826ede9a5943d3f00591
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.2-py3-none-any.whl

Download URL schema_org_python-0.1.2-py3-none-any.whl
Size 462.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d96f58ad05c65317a805b5878a63a060656321788a917cb3b909eea5827babbf
BLAKE2b-256 checksum
How to use checksums
04ddc6a5eff53ad2504148f27b0519027400d0e797e82153108611e804382188
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

This release

0.1.2 This release

2 release files

0.1.1

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