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.13.12.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flytekitplugins_pydantic-1.13.12.tar.gz.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.13.12.tar.gz
Algorithm Hash digest
SHA256 032e00754bbabdc8967db95752654db6a3711688ed4c099b2988ada7929b1f1c
MD5 672ea2c3cad1a2762a6b4fdad81b4ca7
BLAKE2b-256 7f0dd192cb2185d9df6e5972eaaf5fba4d151fa6c4929134402880a2f81808fe

See more details on using hashes here.

File details

Details for the file flytekitplugins_pydantic-1.13.12-py3-none-any.whl.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.13.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0caba1e724cb2f0badea3f96564d64915207cbe9fb1a2e8154c1504793d64ca3
MD5 39d6a315cd9267c46fa6c73a626aba2d
BLAKE2b-256 bdc3c9a63b6d5bab90c3ee15cd38304414943b73b9701f5f9418f157b2227ca4

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