Skip to main content

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

flytekitplugins_pydantic-1.14.0b3.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flytekitplugins_pydantic-1.14.0b3.tar.gz.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.14.0b3.tar.gz
Algorithm Hash digest
SHA256 1faffb0d6a06f42cfd75203c803441fab6a2ebb2cba61028d0c1b973ea831892
MD5 b1b46a3fe28bcd35b0a83e0f2f188cfe
BLAKE2b-256 c8a8d68bf30ea1bf9b59f5a6e6de292d62b4d91dea3d392dc9a7cdc6ff92943a

See more details on using hashes here.

File details

Details for the file flytekitplugins_pydantic-1.14.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.14.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 c63069853d0c1d45efd1415de5980b4bd481e8103280d1ba70b5077494f5e1d1
MD5 bb956bc3f71db4604d0012cc1686ffe3
BLAKE2b-256 3e08606be9b18380c5e9f0a81666eb1fc3b55d4d31db5e77856a732a376a4939

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page