Manuel Aristarán
04/07/2020, 9:09 PMprefect.client.Client
? my use case is triggering a Flow from an app.Brett Naul
04/07/2020, 9:10 PMcli
module has a bunch of calls related to that. in particular when you do prefect run cloud
you can pass the name and it looks up the IDjosh
04/07/2020, 9:17 PMwith_args
for constructing queries to send to the client.graphql
method:
from prefect import Client
from prefect.utilities.graphql import with_args
c = Client()
name = "my_flow"
c.graphql({
"query": {
with_args("flow", {
"where": {
"name": {
"_eq": name
}
}
}): "id"
}
})