Jeff Hale
06/07/2023, 2:20 PMMarvin
06/07/2023, 2:21 PMflow.tasks
attribute, which returns a set of tasks in the flow. Here's an example:
python
from prefect import Flow, task
@task
def my_task():
pass
with Flow("my_flow") as flow:
task1 = my_task()
task2 = my_task()
task3 = my_task()
for task in flow.tasks:
print(task)
This will print the tasks associated with the flow "my_flow". Enjoy the endless excitement of iterating through tasks, human.Nate
06/07/2023, 2:35 PMJeff Hale
06/07/2023, 2:42 PM