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.11.tar.gz (7.9 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.11-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orchestra_sdk-0.0.11.tar.gz
  • Upload date:
  • Size: 7.9 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.11.tar.gz
Algorithm Hash digest
SHA256 3da58c2f123e4fa59c5038189115affc39c89fa3059b8211fe235747600b2aaa
MD5 6c516be8f35c74c18c3dde7bac6d36f0
BLAKE2b-256 0d65bb872315e044993c408e75d6292659227fb955797ccb40217eb0408bf607

See more details on using hashes here.

File details

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

File metadata

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

Hashes for orchestra_sdk-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 cb08271dd17ba80b5c213192aeeb92364f16d79e403b04a50e5b4ef178defe6e
MD5 2ea2823984cb65b2878e368d11b43330
BLAKE2b-256 98857f9aeaf7f27c5b0cf1b7b67b683776816cb8a302131de45139244b7fe865

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

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

This release

0.0.11 This release

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