howdy! Is there a way to kick off a flow run via t...
# prefect-community
e
howdy! Is there a way to kick off a flow run via the prefect libs like outside of a flow
1
a
yup, with run_deployment, you can trigger a flow run from anywhere even fire-and-forget
n
Hey @Erik Mathis - it's always helpful to know whether you're looking for info on Prefect 1 or Prefect 2, but regardless: • prefect 1 you can use the prefect client's
create_flow_run
so something like
Copy code
from prefect.client import Client

client = Client()

client.create_flow_run(...)
• prefect 2 you can use
run_deployment
so something like
Copy code
from prefect.deployments import run_deployment

run_deployment(name="my-flow/my-deployment")
anna beat me to it 😄 , but just in case that was helpful
gratitude thank you 1
e
Thanks both! that was super helpful… and I need to catch up on medium 😕
🙌 1