Flytekit is the Python SDK for Flyte, an open-source workflow orchestration platform designed for machine learning and data science. It enables users to define, execute, and monitor scalable and reliable data and ML pipelines as tasks and workflows using standard Python. The library is actively developed, with frequent minor releases, typically on a bi-weekly or monthly cadence.
pip install flytekitVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define simple tasks using `@task` and compose them into a workflow using `@workflow`. It also shows how to execute the workflow locally for testing purposes. For full features like caching, retries, and scheduling, workflows need to be deployed to a Flyte cluster using the `flytectl` CLI.
Migrate your code to use the Flytekit 1.x API. Refer to the official Flytekit documentation for the latest decorators and execution patterns.
For local testing, call the top-level workflow function (e.g., `my_workflow()`). Within a workflow, pass task/workflow outputs as arguments to subsequent steps; Flyte handles the data plumbing automatically. Avoid direct manipulation of `TaskOutput` or `WorkflowOutput` objects.
Use a local Flyte sandbox (e.g., via `flytectl sandbox start`) or deploy your workflows to a Flyte cluster to test and utilize all features. Ensure `flytectl` is installed and configured correctly for deployment.
Run `pip install flytekit` to install the SDK.
Pass `TaskOutput` or `WorkflowOutput` objects as arguments to subsequent tasks. Flyte's engine will automatically manage the data flow and provide the actual values at runtime.
Use Flyte's built-in type transformers (e.g., `flytekit.types.pickle.FlytePickle[pd.DataFrame]`) or define a custom type transformer for unsupported types. Ensure all task/workflow I/O types are explicitly annotated with Flyte-compatible types.
Install `flytectl` (e.g., `brew install flyteorg/homebrew-tap/flytectl` on macOS, or download the binary from GitHub releases) and ensure it's accessible in your terminal.