lexiq-legal
pydantic_schemaorg
Python

Schema.org classes in pydantic

Last updated Jun 28, 2026
74
Stars
26
Forks
8
Issues
+1
Stars/day
Attention Score
8
Language breakdown
Python 99.7%
Smarty 0.3%
โ–ธ Files click to expand
README

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

install pydantic-schemaorg


Import any class you want to use by with the following convention
pydanticschemaorg.<SCHEMAORGMODELNAME> import <SCHEMAORGMODEL_NAME>


A full (hierarchical) list of Schema.org model names can be found here

Example usages

from pydantic_schemaorg.ScholarlyArticle import ScholarlyArticle

scholarlyarticle = ScholarlyArticle(url='https://github.com/lexiq-legal/pydanticschemaorg', 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/pydanticschemaorg", "sameAs": "https://github.com/lexiq-legal/pydanticschemaorg", "copyrightNotice": "Free to use under the MIT license", "dateCreated": "15-12-2021"}

ยฉ 2026 GitRepoTrend ยท lexiq-legal/pydantic_schemaorg ยท Updated daily from GitHub