Thread
#prefect-community
    b

    Berty

    1 year ago
    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.
    with Flow('...') as f:
       t = task(some_func) # <-- returns tuple
       c = task(consume_func, keyword_tasks={'config': t[0]})
    Michael Adkins

    Michael Adkins

    1 year ago
    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
    b

    Berty

    1 year ago
    Yes this was the announcement that I saw, thank you!