Flytekit Python Reference#

Flytekit Tags

This section of the documentation provides detailed descriptions of the high-level design of Flytekit and an API reference for specific usage details of Python functions, classes, and decorators that you import to specify tasks, build workflows, and extend Flytekit.

Installation#

pip install flytekit

For developer environment setup instructions, see the contributor guide.

Quickstart#

from flytekit import task, workflow

@task
def sum(x: int, y: int) -> int:
   return x + y

@task
def square(z: int) -> int:
   return z * z

@workflow
def my_workflow(x: int, y: int) -> int:
   return sum(x=square(z=x), y=square(z=y))

print(f"my_workflow output: {my_workflow(x=1, y=2)}")

Expected output:

my_workflow output: 5