Jack Sundberg
02/21/2021, 1:38 AMclient.create_flow_run(flow_id)
But this requires me to store or know the flow_id, which I'd rather not do between separate scripts. Is there a reason this type of submission isn't supported?:
client.create_flow_run(project_name, flow_name)
The CLI supports this so I expected the python API for client to as well. If it's alright, I'd like to open a feature-request on github. I think the fix will be easy. Something like:
def create_flow_run(flow_id=None, project_name=None, flow_name=None):
if not flow_id and not (project_name and flow_name):
raise ValueError("Either a flow_id or a project_name+flow_name must be provided")
# then add if/else to handle proper graphql mutation
Amanda Wee
02/21/2021, 9:25 AMget_flow_id
method that returns a flow id or None
given the project name and flow name. This way, you can get the flow id to pass to create_flow_run
and should there be some other use cases requiring flow id, they'll benefit too.Jack Sundberg
02/21/2021, 9:47 PM