https://prefect.io logo
#prefect-community
Title
# prefect-community
e

Erik Mathis

11/17/2022, 9:37 PM
howdy! Is there a way to kick off a flow run via the prefect libs like outside of a flow
1
a

Anna Geller

11/17/2022, 10:16 PM
yup, with run_deployment, you can trigger a flow run from anywhere even fire-and-forget
n

Nate

11/17/2022, 10:17 PM
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

Erik Mathis

11/17/2022, 10:43 PM
Thanks both! that was super helpful… and I need to catch up on medium 😕
🙌 1