https://prefect.io logo
Title
m

Mathias Herberts

09/08/2021, 9:36 AM
Hi, is there a way to have event driven flows executions?
:upvote: 1
n

Noah Holm

09/08/2021, 9:46 AM
This is a sought after feature, there’s a PIN which also mentions one of the current suggestions on triggering flows based on e.g., lambdas
m

Mathias Herberts

09/08/2021, 9:54 AM
PIN 14 is marked as paused, so difficult to understand the progress on this type of feature. What is the most current pattern for simulating event based executions? Can external tools trigger a flow run via an API call for example? Would parallel executions of flows be possible?
:upvote: 1
n

Noah Holm

09/08/2021, 9:59 AM
I’m just a fan trying to learn more by interacting here so I’m going to let the team answer for potential progress. But yes you would be able to trigger flow runs with an API call
k

Kevin Kho

09/08/2021, 1:39 PM
Here is a resource for that. Basically, you create a flow run with an API call.
m

Mathias Herberts

09/08/2021, 2:36 PM
Thanks
b

Boggio

09/08/2021, 7:38 PM
I'm triggering a dag from another python app where I listen for events.
prefect.Client(api_server, api_key, tenant_id, api_token).create_flow_run(version_group_id=CONSUMER_VERSION_GROUP, context={key: event})
k

Kevin Kho

09/08/2021, 7:39 PM
You guys may be interested that you don’t even need the client. This can be done through stuff like cURL or javascript too.