orbitra.flows.client
Functions
get_flows_client
environment: The environment to get the API URL from. Defaults to “prod”.
- An authenticated OrbitraFlowsClient instance.
Classes
OrbitraFlowsClient
A wrapper around SyncPrefectClient for interacting with Orbitra Flows.
Methods:
api_url
get_flow_run_logs_by_id
flow_run_id: The ID of the flow run to get logs for.limit: Maximum number of log records to return. Defaults to None (no limit).
- list[Log]: The flow run’s logs sorted by timestamp ascending. Empty if the run has no logs or if no run exists with the given ID.
run_deployment
deployment: The callable decorated with @orbitra_deployment.**kwargs: Parameters forwarded to the flow run (type-checked against the flow signature).
- The ID of the created flow run.
run_deployment_by_name
deployment_name: The name of the deployment to run in the format <FLOW_NAME>/<DEPLOYMENT_NAME>.parameters: Parameters to pass to the flow run. Defaults to None.
- The ID of the created flow run.
sync_prefect_client
wait_for_flow_run
flow_run_id: The ID of the flow run to wait for.poll_interval: Seconds between polling attempts. Defaults to 5.0.timeout: Maximum seconds to wait before raising an error. Defaults to None (wait forever).raise_on_flow_failure: If True, raise FlowsError on flow failure. If False, return the FlowRun instead. Defaults to True.
- The completed flow run object.
FlowsError: If the flow run fails, crashes, or is cancelled (only when raise_on_flow_failure=True).