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
Metadata
Release files for orchestra-sdk 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| orchestra_sdk-0.0.13.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| orchestra_sdk-0.0.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / orchestra_sdk-0.0.13.tar.gz
| Download URL | orchestra_sdk-0.0.13.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67f189b5e0f2be4ed6670c69f41e98b152299a795f0cd1854286ff583b6f9bfb
|
|
BLAKE2b-256 checksum How to use checksums |
6a6c44785b2f96960375aeb89a0989b8569412186857b1ca99b72479fd094d16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|
Release files / orchestra_sdk-0.0.13-py3-none-any.whl
| Download URL | orchestra_sdk-0.0.13-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ea4f3eae84fb1dca44e7c0778d2639c2f3fa94a2406632ff57c3bfdc9c94367
|
|
BLAKE2b-256 checksum How to use checksums |
f97ca655dc897e61a02754ae3e0d09c84a7a779b4f64f4aa2821839b6ad4bb97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.2
|