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.


pip install flytekit

For developer environment setup instructions, see the contributor guide.


from flytekit import task, workflow

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

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

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