Hi all! Are there any code examples of using the <...
# prefect-community
k
Hi all! Are there any code examples of using the python client to create a flow run using
create_flow_run()
in prefect 2? I’m trying to see how the
flow
parameter should be setup
a
k
thanks for the info - I’ve been able to create flow runs using the
create_flow_run_from_deployment()
by following https://discourse.prefect.io/t/how-to-schedule-a-flow-run-from-a-deployment-for-a-specific-date/1654, but I wanted to use
create_flow_run()
because I need to set an
idempotency_key
for the run, and I also don’t see that option when creating the flow run from a deployment. Is there any details on how the
flow
parameter should be set for created_flow_run?
a
the parameters will be part of this PR and idempotency key is no longer needed in v2, it's set automatically afaik
k
for my use case I don’t want it set automatically, I want to choose the value (e.g. I only want the flow to run 1x per calendar day)
z
We should add
idempotency_key
support to
create_flow_run_from_deployment
— I do not think there is any reason to exclude it.
We just haven’t exposed everything the API supports in the client yet.
k
👍 TY!
z
k
awesome, thank you!!
a
sorry for saying sth misleading - I thought we already add idempotency key to each flow run upon insertion based on this @Zanie
z
That's only for bulk insertion of flow runs by the scheduler service
a
ahh ty!