Plugin adding type support for Pydantic models
Project description
Flytekit Pydantic Plugin
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:
pip install flytekitplugins-pydantic
Type Example
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):
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flytekitplugins_pydantic-1.13.13.tar.gz
.
File metadata
- Download URL: flytekitplugins_pydantic-1.13.13.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59800e14300ffa8e08eb483fc0ec1240c2a47e65438eb686b1cacd3c319882cf |
|
MD5 | 09806615cd1bb2bc631fa589777fbed6 |
|
BLAKE2b-256 | 17e99a8748dd9f5235190a38f172064eb4c684fb921e9e14b935311fe04887f4 |
File details
Details for the file flytekitplugins_pydantic-1.13.13-py3-none-any.whl
.
File metadata
- Download URL: flytekitplugins_pydantic-1.13.13-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c83c5bfe7695f7c58bcb89c3b686d46f0f9650cce9ff8765d18becb0f1faec |
|
MD5 | 429ac82b080c2f1aea5bb222a708c906 |
|
BLAKE2b-256 | 62364d33a63317b5d99f0ae9ac8a9bd9ac94b2b3c1155118be6c2ad5d2a4ecb9 |