https://prefect.io logo
x

Xavier Babu

03/15/2022, 5:30 PM
How to call Prefect Python APIs within Prefect Orion? Also, how to call Prefect Orion Python APIs from a Java application? Do we have any tutorial or doc for both cases?
z

Zanie

03/15/2022, 5:38 PM
Are you talking about using the “flow development” APIs like
@flow
and
@task
or the orchestration API via HTTP?
x

Xavier Babu

03/15/2022, 6:29 PM
Orchestration APIs via HTTP
Especially I would like to deploy ABC.py which has flows, subflows and tasks, via Python Orion REST API. I don't see flow_location attribute in the Orion API doc. I am not sure how to pass the ABC.py and deploy the workflow.
If I only send the name, how do API know which python file to use and deploy?
z

Zanie

03/15/2022, 8:22 PM
The
DeploymentSpec
expands a
flow_location
into the
flow_data
document e.g.
{"encoding": "file", "blob": b"/path/to/ABC.py"}
The python API contains conveniences to construct the objects the orchestration API requires
2 Views