Hi all, I'm having trouble finding any documentati...
# prefect-community
Hi all, I'm having trouble finding any documentation around instantiating flow runs from a server app (fastapi). At present, here's the setup: 1. cloud as the backend 2. local agent + executor 3. web service (fastapi) running inside a docker container on my local machine If I've already registered some tasks by manually running a script, how am I supposed to instantiate flow runs from the web service? The python scripts with the task and flow definitions are also available for flask app
I think what i probably need is
but where and how do i configure the access tokens for this function to run as expected?
task is actually for starting a flow run from a flow run. I believe you're just looking for https://docs.prefect.io/orchestration/concepts/flow_runs.html#core-client
thanks for replying. Through the client, can I create a flow run just on the basis of the flow name, and the latest un-archived version gets instantiated?
It requires the
which you'd get when you register the flow. You can query for the latest unarchived run by flow name beforehand if you'd like. There's a user-contributed PR in progress to do this query for you (https://github.com/PrefectHQ/prefect/pull/4146) but you can also just look at the source code at
to see an example of the query needed
oh okay. Yes, already had a look at the code for the
cli command. Thanks for the guidance.