Jeff Williams
03/29/2021, 2:17 PMDylan
Dylan
Jeff Williams
03/29/2021, 2:32 PMfrom prefect import Flow, task
@task
def fn():
return {'a': 1, 'b': 2}
with Flow('Indexing Flow') as flow:
x = fn()
y = x['a']
# I am adding the following line
print(f'a is{y}'
Which, from what I am reading in the docs, should be the value of 1.Dylan
Jeff Williams
03/29/2021, 2:36 PMDylan
Dylan
y
in that example is a TaskDylan
Dylan
Dylan
from prefect import Flow, task
@task
def fn():
return {'a': 1, 'b': 2}
@task
def print_result(input):
print(input)
with Flow('Indexing Flow') as flow:
x = fn()
y = x['a']
print_result(y)
Jeff Williams
03/29/2021, 2:41 PMDylan
Jeff Williams
03/29/2021, 2:46 PMDylan
Dylan
Dylan