https://prefect.io logo
Title
e

Eric

08/31/2020, 8:17 AM
Hello. Noob question here. 1. Is there a way to use python to "quick run" a flow (create a flow-run) which has been registered onto Prefect server? I've seen the doc 'retrieve flow' but after retrieved the flow, flow.run() is executed by python. If I can trigger the "quick run" with python, I can see the log file on Prefect page instead of just on console. Thanks!
m

Marwan Sarieddine

08/31/2020, 11:59 AM
To create a flow run for a specific flow using python - you can use the client:
import prefect 
client = prefect.Client()
client.create_flow_run(flow_id="<flow id>")
the flow_id is generated when you call register()
e

Eric

08/31/2020, 11:54 PM
It does work!! Thank you very much 😄 @Marwan Sarieddine
m

Marwan Sarieddine

08/31/2020, 11:55 PM
Awesome - you are welcome :)
😊 1