Plugin adding type support for Pydantic models
Project description
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:
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.14.0b4.tar.gz
.
File metadata
- Download URL: flytekitplugins_pydantic-1.14.0b4.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b744edcfed1d5d0015b525c132600eb10ae5b147c1027ee1fcc00c2d7900824f |
|
MD5 | b5bc42a01f189caf156cfbfde02c3177 |
|
BLAKE2b-256 | d09d757575268cfde1176778640aacb6ec0d5ab185112b301e437251b68dad78 |
File details
Details for the file flytekitplugins_pydantic-1.14.0b4-py3-none-any.whl
.
File metadata
- Download URL: flytekitplugins_pydantic-1.14.0b4-py3-none-any.whl
- Upload date:
- Size: 9.5 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 | 1e2b50fe8f4772fc2461389e9d66a5e97a0d459fef68aa8ca2f61c77d7b61ae1 |
|
MD5 | a56d2ba29e0507376b93a2bc825ddf3e |
|
BLAKE2b-256 | bd185565f0c12b2a23582af1b9af5954dde1c84829439509a0907b43f8289e86 |