pydantic2-schemaorg


Namepydantic2-schemaorg JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/blurry-dev/pydantic2-schemaorg
SummaryPydantic classes for Schema.org
upload_time2024-04-13 16:43:04
maintainerNone
docs_urlNone
authorJohn Franey
requires_python<4.0,>=3.10
licenseMIT
keywords schema.org pydantic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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/d8/f6/77380d73cb1654ae8d4e011c6d56d4b61c7e4af3b045254d26231c7400ae/pydantic2_schemaorg-0.1.1.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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pydantic classes for Schema.org",
    "version": "0.1.1",
    "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": "a99af708fc5c8abaf96a2fe45607548ac45d87f7d5b5b80e086f3f66c39e0281",
                "md5": "bdc942957586fdd32c4cf68f1285923f",
                "sha256": "6514804dfcd6e482a9f3fad548162e6238a12953245d1f456f4dace82dc3b975"
            },
            "downloads": -1,
            "filename": "pydantic2_schemaorg-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bdc942957586fdd32c4cf68f1285923f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 890917,
            "upload_time": "2024-04-13T16:43:02",
            "upload_time_iso_8601": "2024-04-13T16:43:02.665109Z",
            "url": "https://files.pythonhosted.org/packages/a9/9a/f708fc5c8abaf96a2fe45607548ac45d87f7d5b5b80e086f3f66c39e0281/pydantic2_schemaorg-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8f677380d73cb1654ae8d4e011c6d56d4b61c7e4af3b045254d26231c7400ae",
                "md5": "17fe6f6a1daf1f5223e0be23cd656e70",
                "sha256": "19cd6772830b6932fff4f41af8a3449f44f0cac981148aa64d037cd6bfb38ba9"
            },
            "downloads": -1,
            "filename": "pydantic2_schemaorg-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "17fe6f6a1daf1f5223e0be23cd656e70",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 376823,
            "upload_time": "2024-04-13T16:43:04",
            "upload_time_iso_8601": "2024-04-13T16:43:04.969837Z",
            "url": "https://files.pythonhosted.org/packages/d8/f6/77380d73cb1654ae8d4e011c6d56d4b61c7e4af3b045254d26231c7400ae/pydantic2_schemaorg-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-13 16:43:04",
    "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"
}
        
Elapsed time: 0.23061s