Skip to main content

Orchestra Python SDK

PyPI

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 to
  • ORCHESTRA_TASK_RUN_ID: The UUID of the Task being executed
  • ORCHESTRA_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

  1. The decorator will firstly read and validate the environment variables
  2. It will send a RUNNING status update to Orchestra
  3. Your function will then run
  4. If an exception is raised, the decorator will send a FAILED status update to Orchestra
  5. If the function finishes without an error being raised, regardless of the return value, the decorator will send a SUCCEEDED status 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)

Source distribution for orchestra-sdk 0.0.13
File Size Uploaded
orchestra_sdk-0.0.13.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orchestra-sdk 0.0.13
File Interpreter ABI Platform
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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page