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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orchestra_sdk-0.0.14.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orchestra_sdk-0.0.14-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file orchestra_sdk-0.0.14.tar.gz.

File metadata

  • Download URL: orchestra_sdk-0.0.14.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

Hashes for orchestra_sdk-0.0.14.tar.gz
Algorithm Hash digest
SHA256 beac5b107d8fcaa99bb3da97c3c61644e0a3e3222cd16824b638f5d10e219969
MD5 11adf71d9ebc162ddb35c1eca0df0a22
BLAKE2b-256 16a1256d1f08cf0da6b6b32e5749bd039859e7451f95dfdeccc9fcfef25c1aa3

See more details on using hashes here.

File details

Details for the file orchestra_sdk-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: orchestra_sdk-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for orchestra_sdk-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 16546a766790911dcff5f06f4a7bfd6f83b3afcf9ae240c378cde14230649713
MD5 a8180c1d8e9a8de94e7662c3906bbc56
BLAKE2b-256 6c890cc1c37f3c44626938f4a16a08074bc307ce4e48b645e0597aaa9ff1fff0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

This release

0.0.14 This release

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

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