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
Close
Hashes for flytekitplugins_pydantic-1.13.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf162359226f0a35dba5bfb858098da4dfd6c4ee6fba9be662e990a0b301e2c1 |
|
MD5 | 281acf407a2eb0abe210216a129fece2 |
|
BLAKE2b-256 | 2d818a51fb1d4e843504023cb6ba5a52002098a7b33c8e4a28654d6bff694bc6 |
Close
Hashes for flytekitplugins_pydantic-1.13.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27fd429bc2fe8c5daa823beaceaf30413c4f24785dc7f106641fd0dc3791ee4b |
|
MD5 | 19ec9597fb64a24c811809985227933b |
|
BLAKE2b-256 | 7f6496bff9f93a66e4173cfe815dffc60933dc74f288b45517cf6ba41dfd6822 |