Skip to main content

Plugin adding type support for Pydantic models

Project description

Flytekit Pydantic Plugin

Warning

This plugin is deprecated and will be removed in the future.

Please directly install pydantic and use BaseModel in your Flyte tasks.

Introduction

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.14.9.tar.gz (9.4 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.14.9-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.14.9.tar.gz
Algorithm Hash digest
SHA256 9a09dad4631671b871d056c32fdb1baec3a95226dc435ed38bc6baf2bf37ed18
MD5 4b0d2e2d69d6dbec233b032567bfe14f
BLAKE2b-256 0a8136526bed8a0f32e7f954a94f57e339f484825773c046efeceabd17d87c5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flytekitplugins_pydantic-1.14.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc3a527312df7d4bbf10d534fc6e21924c5b18baca8d3c1df086e467cbbad14
MD5 c10d806f04487c9cbf82d77203188b26
BLAKE2b-256 f31f9b77dae8d1f4725ea310d822ff4a5b30956bb8b565f85a3c71bcc83a2d75

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