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.12.1b0.tar.gz (9.1 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.12.1b0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file flytekitplugins_pydantic-1.12.1b0.tar.gz.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.12.1b0.tar.gz
Algorithm Hash digest
SHA256 310735c791db61d5e588c9ea557553181403477d49174c6d429c49da34a2e712
MD5 66c8b889b17ad3c9217ee4a3d240a0f9
BLAKE2b-256 ac5d55acdea9eefa116cad107c42ee692b8be543441a43160bd51f10c94d661d

See more details on using hashes here.

File details

Details for the file flytekitplugins_pydantic-1.12.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.12.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4153122c114330ab5f1a564431f9164e52df1ba0ec5670329076e19466f84ff
MD5 50ecd68c609046368c4f4be476bf3558
BLAKE2b-256 817ad8fcb253d4476829c3368b6f99e0c6e2a47d22a3b1914f5245dcedb66360

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