Skip to main content

Python client for the DAMIT AIOps Orchestrator REST API and Socket.IO realtime events

Project description

orchestrator-client

Python client for the DAMIT AIOps Orchestrator REST API and Socket.IO realtime events.

Install

pip install orchestrator-client

Requires Python >= 3.12.

Quick Start

from orchestrator_client import Orchestrator

client = Orchestrator(base_url="http://localhost:8080")

# Create a task
task = client.create_task(
    workflow_id="proactive",
    goal_prompt="Analyze system logs for errors",
    max_iterations=50,
)
print(f"Created: {task.task_id}")

# Poll status
status = client.get_task_status(task.task_id)
print(f"Status: {status.status}, iteration {status.iteration}/{status.max_iterations}")

# List tasks
tasks = client.list_tasks(workflow_id="proactive", limit=10)
for t in tasks.tasks:
    print(f"  {t.id}: {t.status}")

# Cancel
client.cancel_task(task.task_id)

client.close()

Environment Variables

Variable Default Description
ORCHESTRATOR_URL http://localhost:8080 Base URL (supports subpath)
ORCHESTRATOR_API_KEY Optional bearer token
ORCHESTRATOR_TIMEOUT 30.0 HTTP timeout (seconds)
ORCHESTRATOR_MAX_RETRIES 3 Max retry attempts

SSL / Self-Signed Certificates

For orchestrator instances behind HTTPS with self-signed certificates, pass verify_ssl=False:

from orchestrator_client import Orchestrator

client = Orchestrator(
    base_url="https://orchestrator.internal:8443",
    verify_ssl=False,
)

Or inject a pre-configured httpx.AsyncClient for full control:

import httpx
from orchestrator_client import OrchestratorAsync

custom = httpx.AsyncClient(verify=False, timeout=httpx.Timeout(60.0))
client = OrchestratorAsync(http_client=custom)

## Async Variant

For use inside async code (e.g. FastAPI, asyncio scripts):

```python
from orchestrator_client import OrchestratorAsync

async with OrchestratorAsync() as client:
    status = await client.get_task_status("task-abc123")

Exceptions

All inherit from OrchestratorError and carry status_code and error_code:

Exception Meaning
OrchestratorConnectionError Network / DNS / timeout
OrchestratorAuthError 401/403
OrchestratorNotFoundError 404
OrchestratorAPIError 400/500 with error code
OrchestratorConfigError Bad env vars / missing config

Documentation

Detailed docs with full method listings and examples:

Testing

pip install -e ".[dev]"
pytest

License

Apache 2.0

Project details


Download files

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

Source Distribution

orchestrator_client-5.7.10.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

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

orchestrator_client-5.7.10-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file orchestrator_client-5.7.10.tar.gz.

File metadata

  • Download URL: orchestrator_client-5.7.10.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orchestrator_client-5.7.10.tar.gz
Algorithm Hash digest
SHA256 0d9b182909da8f72b0faf47b43208bff56fdf7d2964d1e1b0cb60913f3cf96b3
MD5 13573156af2bb1eb08e6048f32aeb229
BLAKE2b-256 565e7df5f3f0b66174f0ed15247c2512be97477461639dfa19d16469dbc4390e

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchestrator_client-5.7.10.tar.gz:

Publisher: client-py-publish.yaml on DamitDev/orchestrator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orchestrator_client-5.7.10-py3-none-any.whl.

File metadata

File hashes

Hashes for orchestrator_client-5.7.10-py3-none-any.whl
Algorithm Hash digest
SHA256 f21c06a811f9bf74b58711a76aa700d223c7dc8fa5cec00209823b1a482c7da9
MD5 af6a1fa6ac84249c36baada279a3a684
BLAKE2b-256 0468acf0516d1f897db4cd5c1a2b1025824693449b07df338b2466e9e0cc9b4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchestrator_client-5.7.10-py3-none-any.whl:

Publisher: client-py-publish.yaml on DamitDev/orchestrator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page