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.3b5.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.3b5-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for flytekitplugins-pydantic-1.10.3b5.tar.gz
Algorithm Hash digest
SHA256 7df5959e34d8edfec3e17745730b074929b68a83c06c9b318d3a2f1661e6006e
MD5 6fb96c749b56f156b16742d39397ca7d
BLAKE2b-256 76960e8b8759f163cef5533834df093a2d18ea6f8b42a8a3d25d43e8ca77690e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.10.3b5-py3-none-any.whl
Algorithm Hash digest
SHA256 dc829e32c7b6b7ab37312aaf940fa3c8dce63592e8af44b842b7e212e5b9655b
MD5 576375582a3fbec450e1231e74986e54
BLAKE2b-256 36303bdf8ba1e5dcf70e6db652713560015dc620c2c8e4fe00e4b5f163d91ccf

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