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:
- REST API client — all endpoints, workflow interactions, configuration
- Socket.IO realtime — event types, room subscriptions, streaming
- SSE status stream — lightweight status-only monitoring
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orchestrator_client-5.7.4.tar.gz.
File metadata
- Download URL: orchestrator_client-5.7.4.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9e7e441455bc82af6101755b8f8e81c8f845bab0849a36eb17dba11898d5aa
|
|
| MD5 |
f0555a435df889f0c5306b05ae7ef2e8
|
|
| BLAKE2b-256 |
ef6a39403c834e4ecaae78498943959a66a516cc93b5995e0eb280c56b697253
|
Provenance
The following attestation bundles were made for orchestrator_client-5.7.4.tar.gz:
Publisher:
client-py-publish.yaml on DamitDev/orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orchestrator_client-5.7.4.tar.gz -
Subject digest:
ad9e7e441455bc82af6101755b8f8e81c8f845bab0849a36eb17dba11898d5aa - Sigstore transparency entry: 1645189948
- Sigstore integration time:
-
Permalink:
DamitDev/orchestrator@aea27e4afc19a74f458dc122b206732bc85451f4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DamitDev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
client-py-publish.yaml@aea27e4afc19a74f458dc122b206732bc85451f4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file orchestrator_client-5.7.4-py3-none-any.whl.
File metadata
- Download URL: orchestrator_client-5.7.4-py3-none-any.whl
- Upload date:
- Size: 43.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b67cfe571d169d5a3fca76429a707258c22539398f9c17a681280ce776516d3
|
|
| MD5 |
07cd640872b739a20299b7d5db2da0a0
|
|
| BLAKE2b-256 |
c61b01ce5a4327951d2aacd44e510243c48331a8b7ce66a1ee16b6c4a7a0f09f
|
Provenance
The following attestation bundles were made for orchestrator_client-5.7.4-py3-none-any.whl:
Publisher:
client-py-publish.yaml on DamitDev/orchestrator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orchestrator_client-5.7.4-py3-none-any.whl -
Subject digest:
9b67cfe571d169d5a3fca76429a707258c22539398f9c17a681280ce776516d3 - Sigstore transparency entry: 1645190397
- Sigstore integration time:
-
Permalink:
DamitDev/orchestrator@aea27e4afc19a74f458dc122b206732bc85451f4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DamitDev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
client-py-publish.yaml@aea27e4afc19a74f458dc122b206732bc85451f4 -
Trigger Event:
workflow_dispatch
-
Statement type: