# pydantic2_schemaorg
[![PyPi version](https://img.shields.io/pypi/v/pydantic2-schemaorg.svg)](https://pypi.python.org/pypi/pydantic2-schemaorg/)
[![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![](https://img.shields.io/github/license/blurry-dev/pydantic2_schemaorg.svg)](https://github.com/blurry-dev/pydantic2_schemaorg/blob/master/LICENSE)
Use [Schema.org](https://schema.org) types in [pydantic](https://pydantic-docs.helpmanual.io/)!
**pydantic2_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](https://schema.org/version/latest/schemaorg-current-https.jsonld)
## Requirements
Works with python >= 3.10
## How to install
```python
pip install pydantic2-schemaorg
```
Import any class you want to use by with the following convention
```python
from pydantic2_schemaorg.<SCHEMAORG_MODEL_NAME> import <SCHEMAORG_MODEL_NAME>
```
A full (hierarchical) list of Schema.org model names can be found [here](https://schema.org/docs/full.html)
## Example usages
```python
from pydantic2_schemaorg.ScholarlyArticle import ScholarlyArticle
scholarly_article = ScholarlyArticle(
url='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',
sameAs='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',
copyrightNotice='Free to use under the MIT license',
dateCreated='15-12-2021'
)
print(scholarly_article.json())
```
```json
{"@type": "ScholarlyArticle", "url": "https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg", "sameAs": "https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg", "copyrightNotice": "Free to use under the MIT license", "dateCreated": "15-12-2021"}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/blurry-dev/pydantic2-schemaorg",
"name": "pydantic2-schemaorg",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "schema.org, pydantic",
"author": "John Franey",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2d/65/21fce94d6db9e15ae0e2a31de72921682662b03a084d8a8f0d86537ddb46/pydantic2_schemaorg-0.3.0.tar.gz",
"platform": null,
"description": "# pydantic2_schemaorg\n\n[![PyPi version](https://img.shields.io/pypi/v/pydantic2-schemaorg.svg)](https://pypi.python.org/pypi/pydantic2-schemaorg/)\n[![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![](https://img.shields.io/github/license/blurry-dev/pydantic2_schemaorg.svg)](https://github.com/blurry-dev/pydantic2_schemaorg/blob/master/LICENSE)\n\nUse [Schema.org](https://schema.org) types in [pydantic](https://pydantic-docs.helpmanual.io/)!\n\n**pydantic2_schemaorg** contains all the models defined by schema.org. The pydantic classes are auto-generated from the\nschema.org model definitions that can be found\non [https://schema.org/version/latest/schemaorg-current-https.jsonld](https://schema.org/version/latest/schemaorg-current-https.jsonld)\n\n## Requirements\n\nWorks with python >= 3.10\n\n## How to install\n\n```python\npip install pydantic2-schemaorg\n```\n\nImport any class you want to use by with the following convention\n\n```python\nfrom pydantic2_schemaorg.<SCHEMAORG_MODEL_NAME> import <SCHEMAORG_MODEL_NAME>\n```\n\nA full (hierarchical) list of Schema.org model names can be found [here](https://schema.org/docs/full.html)\n\n## Example usages\n\n```python\nfrom pydantic2_schemaorg.ScholarlyArticle import ScholarlyArticle\n\nscholarly_article = ScholarlyArticle(\n url='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',\n sameAs='https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg',\n copyrightNotice='Free to use under the MIT license',\n dateCreated='15-12-2021'\n)\nprint(scholarly_article.json())\n```\n\n```json\n{\"@type\": \"ScholarlyArticle\", \"url\": \"https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg\", \"sameAs\": \"https://github.com/blurry-dev/pydantic2-schemaorg/pydantic2_schemaorg\", \"copyrightNotice\": \"Free to use under the MIT license\", \"dateCreated\": \"15-12-2021\"}\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pydantic classes for Schema.org",
"version": "0.3.0",
"project_urls": {
"Documentation": "https://github.com/blurry-dev/pydantic2-schemaorg",
"Homepage": "https://github.com/blurry-dev/pydantic2-schemaorg",
"Repository": "https://github.com/blurry-dev/pydantic2-schemaorg"
},
"split_keywords": [
"schema.org",
" pydantic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd673521f38745efb177b89185a94bde34eddfa8e4e5066db0cc46ff45db173d",
"md5": "d3dcf163d7efde4572796b151efd48e0",
"sha256": "8e8f51cd9ffaaa059a31c064cb3119328b7dd07203b7a18c040f2bfb76cee371"
},
"downloads": -1,
"filename": "pydantic2_schemaorg-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d3dcf163d7efde4572796b151efd48e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 910369,
"upload_time": "2025-01-08T18:46:08",
"upload_time_iso_8601": "2025-01-08T18:46:08.534213Z",
"url": "https://files.pythonhosted.org/packages/dd/67/3521f38745efb177b89185a94bde34eddfa8e4e5066db0cc46ff45db173d/pydantic2_schemaorg-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d6521fce94d6db9e15ae0e2a31de72921682662b03a084d8a8f0d86537ddb46",
"md5": "2e91faaba9d0cab71f6407f5ac68652f",
"sha256": "8b11b3809bd5b26788520182a1b642861c1ea69d2df00ae8d8984ed1249aba47"
},
"downloads": -1,
"filename": "pydantic2_schemaorg-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "2e91faaba9d0cab71f6407f5ac68652f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 345013,
"upload_time": "2025-01-08T18:46:10",
"upload_time_iso_8601": "2025-01-08T18:46:10.326044Z",
"url": "https://files.pythonhosted.org/packages/2d/65/21fce94d6db9e15ae0e2a31de72921682662b03a084d8a8f0d86537ddb46/pydantic2_schemaorg-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-08 18:46:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "blurry-dev",
"github_project": "pydantic2-schemaorg",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pydantic2-schemaorg"
}