Metadata-Version: 2.4
Name: schema-org-python
Version: 0.1.1
Summary: Schema.org schemas as pydantic models
License: MIT
License-File: LICENSE
Keywords: schema.org,pydantic,structured-data,json-ld,rdf,models
Author: Arun Sharma
Author-email: arun@sharma-home.net
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: autoflake (>=2.3.1,<3.0.0)
Requires-Dist: fquery (>=0.4,<0.5)
Requires-Dist: pydantic (>=2.0,<3.0)
Requires-Dist: rdflib (>=7.5.0,<8.0.0)
Requires-Dist: requests (>=2.32.5,<3.0.0)
Project-URL: Bug Tracker, https://github.com/adsharma/schema-org-python/issues
Project-URL: Homepage, https://github.com/adsharma/schema-org-python
Project-URL: Repository, https://github.com/adsharma/schema-org-python
Description-Content-Type: text/markdown

# Pydantic models for schema.org

[![PyPI](https://img.shields.io/pypi/v/schema-org-python.svg)](https://pypi.org/project/schema-org-python/)

[Schema.org](https://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](https://github.com/adsharma/schema-org-python/blob/main/create_pydantic.py) 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](https://schema.org/docs/terms.html).

