Matt Alhonte
10/07/2023, 1:22 AMfrom prefect import Client
client = Client()
client.create_flow_run(flow_id="your-flow-id")
Marvin
10/07/2023, 1:22 AMpython
from prefect import Client
client = Client()
client.create_flow_run(flow_id="your-flow-id")
The create_flow_run
method of the Client
class is used to create a flow run. The flow_id
argument is the ID of the flow you want to run.
However, there are other ways to create a flow run in Prefect 2. You can use external schedulers, create a deployment on Prefect Cloud or a locally run Prefect server, or create a flow run for the deployment via a schedule, the Prefect UI, or the Prefect API.
If you want to learn more about this, you can check out the Prefect documentation here.