Hi Community, I need a quick help in utilizing Pre...
# ask-community
a
Hi Community, I need a quick help in utilizing Prefect Orion's API from an existing Python application, I looked into the documentation to use the Prefect Orion Python Client but somehow I am having trouble using it. My existing stack has an FastAPI server running for a given application and I need to put in a feature that allows external users to use my existing API to run any Prefect Orion flows (my existing API could act as a proxy for the time being). Any suggestions?
a
Yes, I do have an example for you - you can trigger a flow run from deployment using Orion client as shown here. You can make this call even from your existing FastAPI service
Copy code
response = await client.create_flow_run_from_deployment(depl_id)
you can also directly check the source code here
a
This is helpful, Thanks.
👍 1