Mars
07/27/2022, 9:08 PMNate
07/27/2022, 9:16 PMclient.create_flow_run
, which accepts a parameters
kwarg as shown here (in the Python Client tab)@flow
decorated function from another flow and pass arguments like any other python function like
from prefect import flow, task
@task(name="Print Hello")
def print_hello(name):
msg = f"Hello {name}!"
print(msg)
return msg
@flow(name="My Subflow")
def my_subflow(msg):
print(f"Subflow says: {msg}")
@flow(name="Hello Flow")
def hello_world(name="world"):
message = print_hello(name)
my_subflow(message)
hello_world("Marvin")
Mars
07/27/2022, 9:31 PM