flytekitplugins-pydantic


Nameflytekitplugins-pydantic JSON
Version 1.14.3 PyPI version JSON
download
home_pagehttps://github.com/flyteorg/flytekit/tree/master/plugins/flytekit-pydantic
SummaryPlugin adding type support for Pydantic models
upload_time2024-12-26 22:44:54
maintainerNone
docs_urlNone
authorflyteorg
requires_python>=3.9
licenseapache2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flytekit Pydantic Plugin
## Warning
This plugin is deprecated and will be removed in the future.

Please directly install `pydantic` and use `BaseModel` in your Flyte tasks.

## Introduction
Pydantic is a data validation and settings management library that uses Python type annotations to enforce type hints at runtime and provide user-friendly errors when data is invalid. Pydantic models are classes that inherit from `pydantic.BaseModel` and are used to define the structure and validation of data using Python type annotations.

The plugin adds type support for pydantic models.

To install the plugin, run the following command:

```bash
pip install flytekitplugins-pydantic
```


## Type Example
```python
from pydantic.v1 import BaseModel


class TrainConfig(BaseModel):
    lr: float = 1e-3
    batch_size: int = 32
    files: List[FlyteFile]
    directories: List[FlyteDirectory]

@task
def train(cfg: TrainConfig):
    ...
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flyteorg/flytekit/tree/master/plugins/flytekit-pydantic",
    "name": "flytekitplugins-pydantic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "flyteorg",
    "author_email": "admin@flyte.org",
    "download_url": "https://files.pythonhosted.org/packages/24/4b/2243aa20e955dcf94f34088b55f233035816252151557aac3387829eeadb/flytekitplugins_pydantic-1.14.3.tar.gz",
    "platform": null,
    "description": "# Flytekit Pydantic Plugin\n## Warning\nThis plugin is deprecated and will be removed in the future.\n\nPlease directly install `pydantic` and use `BaseModel` in your Flyte tasks.\n\n## Introduction\nPydantic is a data validation and settings management library that uses Python type annotations to enforce type hints at runtime and provide user-friendly errors when data is invalid. Pydantic models are classes that inherit from `pydantic.BaseModel` and are used to define the structure and validation of data using Python type annotations.\n\nThe plugin adds type support for pydantic models.\n\nTo install the plugin, run the following command:\n\n```bash\npip install flytekitplugins-pydantic\n```\n\n\n## Type Example\n```python\nfrom pydantic.v1 import BaseModel\n\n\nclass TrainConfig(BaseModel):\n    lr: float = 1e-3\n    batch_size: int = 32\n    files: List[FlyteFile]\n    directories: List[FlyteDirectory]\n\n@task\ndef train(cfg: TrainConfig):\n    ...\n```\n",
    "bugtrack_url": null,
    "license": "apache2",
    "summary": "Plugin adding type support for Pydantic models",
    "version": "1.14.3",
    "project_urls": {
        "Homepage": "https://github.com/flyteorg/flytekit/tree/master/plugins/flytekit-pydantic"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ceb78c4622f6c527828d32a49b2adf63ecbc95dfed0e81d559f76f4c82b7551",
                "md5": "198558b23ede6a0eeb7bc8eb65d729e8",
                "sha256": "a26d00e4525d46d04f8bb3649f2518b64a45195cb8c15501408fa57d5b43b33e"
            },
            "downloads": -1,
            "filename": "flytekitplugins_pydantic-1.14.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "198558b23ede6a0eeb7bc8eb65d729e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9434,
            "upload_time": "2024-12-26T22:44:02",
            "upload_time_iso_8601": "2024-12-26T22:44:02.714630Z",
            "url": "https://files.pythonhosted.org/packages/1c/eb/78c4622f6c527828d32a49b2adf63ecbc95dfed0e81d559f76f4c82b7551/flytekitplugins_pydantic-1.14.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "244b2243aa20e955dcf94f34088b55f233035816252151557aac3387829eeadb",
                "md5": "25e776dd4499c782704491ff8a939627",
                "sha256": "1b9fc21aa1acac4ec5c24163867146bccd518661be5a9b1ccc0cbcad1ef50996"
            },
            "downloads": -1,
            "filename": "flytekitplugins_pydantic-1.14.3.tar.gz",
            "has_sig": false,
            "md5_digest": "25e776dd4499c782704491ff8a939627",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9277,
            "upload_time": "2024-12-26T22:44:54",
            "upload_time_iso_8601": "2024-12-26T22:44:54.255728Z",
            "url": "https://files.pythonhosted.org/packages/24/4b/2243aa20e955dcf94f34088b55f233035816252151557aac3387829eeadb/flytekitplugins_pydantic-1.14.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-26 22:44:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flyteorg",
    "github_project": "flytekit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flytekitplugins-pydantic"
}
        
Elapsed time: 0.41514s