I am using prefect-server and prefect-worker helm ...
# prefect-kubernetes
d
I am using prefect-server and prefect-worker helm charts to self host my workflows. I am trying to figure out how I can remotely trigger my workflows from my python flask API which is on the same cluster. Any advice would be appreciated!
n
hi @Devin Dennis - if you want to trigger deployments from your flask API you can use
run_deployment
(there's
timeout=0
as a kwarg if you dont want to wait for that to finish)
@Marvin be very concise and show an example using
run_deployment
m
Here's a concise example using `run_deployment`: *import prefect_aws response = prefect_aws.run_deployment( deployment_name="my_awesome_deployment", parameters={} ) print(response)* For more details, refer to the official example: https://raw.githubusercontent.com/zzstoatzz/prefect-code-examples/main/examples/tasks/submitting.py
🙅 1
n
welp, thats not right its more like
Copy code
from prefect.deployments import run_deployment

run_deployment("my-flow/my-deployment", params{...}, timeout=0)