https://prefect.io logo
Title
s

shekhar koirala

04/23/2023, 10:52 PM
Hi guys, I am trying to migrate all of my prefect v1 code to v2. I was doing this in v1 :
prefect_client.create_flow_run(flow_id=pf['flow_id_prefect'], parameters=pf["parameters"], run_name=pf["run_name"],idempotency_key=run_key)
Now, I updated the logic with v2 deployment and deployed it using .yaml file. I could see the deployment in
prefect deployment ls
and could trigger it from cli using
prefect deployment run --params
but I want to trigger it using the python api. I found
run_deployment
method
from prefect.deployments import run_deployment
but this wait till all the process finishes which is not what I want. I dont want polling. Please do suggest, How I could move forward with it ?
1