https://prefect.io logo
b

Berty

12/14/2020, 11:00 PM
Hi Prefect(ers?), I stumbled across a piece of documentation I needed last week but I can't seem to locate now. I have a task that returns a tuple, from which I only want to pass in the first item to the task that consumes it. I recall seeing some way of telling prefect how many results to expect. Can someone point me in the right direction? e.g.
Copy code
with Flow('...') as f:
   t = task(some_func) # <-- returns tuple
   c = task(consume_func, keyword_tasks={'config': t[0]})
z

Zanie

12/14/2020, 11:22 PM
I believe you are looking for
nout
which has a docstring in the api reference at https://docs.prefect.io/api/latest/core/task.html#task-2
❤️ 1
b

Berty

12/14/2020, 11:23 PM
Yes this was the announcement that I saw, thank you!