Metadata-Version: 2.5
Name: schema-org-python
Version: 0.1.2
Summary: Schema.org schemas as pydantic models
Project-URL: Homepage, https://github.com/adsharma/schema-org-python
Project-URL: Repository, https://github.com/adsharma/schema-org-python
Project-URL: Bug Tracker, https://github.com/adsharma/schema-org-python/issues
Author-email: Arun Sharma <arun@sharma-home.net>
License: MIT
License-File: LICENSE
Keywords: json-ld,models,pydantic,rdf,schema.org,structured-data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: autoflake>=2.3.1
Requires-Dist: fquery>=0.5
Requires-Dist: pydantic>=2.0
Requires-Dist: rdflib>=7.5.0
Requires-Dist: requests>=2.32.5
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:

```
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](https://schema.org/docs/terms.html).
