Orchestra Python SDK
This is a lightweight SDK that allows Orchestra to interact with self-hosted applications (Tasks).
The basic premise is for your self-hosted Task to send back status updates and logs to Orchestra. This is done via HTTP requests. The Task is started by Orchestra.
Guide
Firstly, install the package:
pip install orchestra-sdk
The package requires the following environment variable to be set manually:
ORCHESTRA_API_KEY: The API key to connect to Orchestra. This can be found in your settings page.
Orchestra will automatically set the following environment variables when the Task is triggered:
ORCHESTRA_WEBHOOK_URL: The URL to send status updates toORCHESTRA_TASK_RUN_ID: The UUID of the Task being executedORCHESTRA_PIPELINE_RUN_ID: The UUID of the Pipeline Run that the Task is part of
To use the package in your code:
from orchestra_sdk.decorators import orchestra_run
@orchestra_run()
def my_function(arg1, arg2=1):
print("Running complex process")
Summary
- The decorator will firstly read and validate the environment variables
- It will send a
RUNNINGstatus update to Orchestra - Your function will then run
- If an exception is raised, the decorator will send a
FAILEDstatus update to Orchestra - If the function finishes without an error being raised, regardless of the return value, the decorator will send a
SUCCEEDEDstatus update to Orchestra
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orchestra_sdk-0.0.10.tar.gz.
File metadata
- Download URL: orchestra_sdk-0.0.10.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fa3ee2de74a3bdaf0f2988919e9be09d05918129d14442d15b94113f84a3548
|
|
| MD5 |
ea8404dc8cc1a981d49d04fa0871fbd4
|
|
| BLAKE2b-256 |
d10d3314bbf5fcee362893e710d46cb2a9eb6c60df27752ed61ec4754812ad7b
|
File details
Details for the file orchestra_sdk-0.0.10-py3-none-any.whl.
File metadata
- Download URL: orchestra_sdk-0.0.10-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc9279b9ff93c5b25f6317bfe3547bc7a397e2b85c6918eb23459c822c9ca513
|
|
| MD5 |
2fcf4ea3e7ce3d455b9e93f0e818f413
|
|
| BLAKE2b-256 |
d85f1de8ca88fa4f3f61564700eedc4956a061307c41d0186e8ab87230f9ffdd
|