Flytekit Python Reference

This section of the documentation provides more 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