Skip to main content

How to define Activity return values in Python

An Activity Execution can return inputs and other Activity values.

The following example defines an Activity that takes a string as input and returns a string.

@activity.defn
async def say_hello(name: str) -> str:
return f"Hello, {name}!"