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 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.10.3b7.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flytekitplugins_pydantic-1.10.3b7-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file flytekitplugins-pydantic-1.10.3b7.tar.gz.

File metadata

File hashes

Hashes for flytekitplugins-pydantic-1.10.3b7.tar.gz
Algorithm Hash digest
SHA256 9fe8c0f67763977f0d50fee12787e8630edb06db7d5c6601220f618dac9c6d73
MD5 701f1628ba87983cfd92cafdeface651
BLAKE2b-256 b54036adbe3326cff59e43b3cbab24e161dd2b38a390ac9466afaa569af51aff

See more details on using hashes here.

File details

Details for the file flytekitplugins_pydantic-1.10.3b7-py3-none-any.whl.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.10.3b7-py3-none-any.whl
Algorithm Hash digest
SHA256 8f65db17a89a74fdfa77d6d73c4e94d7b9d1b762dd952cc8d92996a0db4d63c2
MD5 135cd7b99661e703159a33eeb3e7b501
BLAKE2b-256 910434d45e77b8b8c41556fc3f486e4b43b752c7a21a4bd710961f0496fb072a

See more details on using hashes here.

Supported by

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