Lana Dann05/04/2022, 7:23 PM
doesn’t work, so i assume we’d need to grab the task from
flow.<method name>(<method arguments>)
and then run the task object. so my follow up question would be, what is the best way to retrieve a task by name from a
And then find the one with the name you want? But I think you can just test the task directly?
from prefect import Flow, task @task def abc(x): return x @task def bcd(x): return x with Flow("..") as flow: a = abc(1) b = bcd(1) print(flow.tasks) print(list(flow.tasks).name)
Lana Dann05/04/2022, 8:02 PM
and you import
@task def abc(x): return x
then is that a task object or just a method?
from myflow import abc