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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for flytekitplugins-pydantic-1.12.0b5.tar.gz
Algorithm Hash digest
SHA256 6cb7039f57be1ebc64950d6257d409759f1a3a36dd1787bc8ed0a733e8aaaffc
MD5 13ac2665a4e92d9c3ba3873a17fe269e
BLAKE2b-256 0553bbaf6cdeedf58314400e9dd0f5eac40c3a7e108fb78a8390dd0fafdeee6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.12.0b5-py3-none-any.whl
Algorithm Hash digest
SHA256 c3b817e658c359475d475cf029fcb300a7428e23d6f597bb227710cebc9c0211
MD5 ca7f38caba76f535df1c6c98d56b82db
BLAKE2b-256 ffac6f98ca35e1343c29f84a62f318d0a100578e22a73737d1bd58091cbc6840

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