Metadata-Version: 2.4
Name: dirigent-client
Version: 0.9.0
Summary: The dirigent API contract: typed wire schemas and an async Python client.
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Requires-Dist: dirigent-common
Requires-Dist: httpx2>=2.12.0
Requires-Dist: pydantic>=2.13.5
Requires-Dist: pyyaml>=6.0.3
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# dirigent-client

The dirigent API contract: typed wire schemas and an async Python client.

```python
from datetime import timedelta

from dirigent_client import Dirigent

async with Dirigent(url="https://dirigent.example.org", token=token) as dg:
    plan = await dg.pipelines.apply("pipelines/daily-climate-load.yaml", dry_run=True)
    run = await dg.pipelines.run("daily-climate-load", params={"day": "2026-08-29"})
    final = await dg.runs.wait(run.run_id, timeout=timedelta(hours=2))
    async for entry in dg.runs.follow_logs(run.run_id):
        print(entry.message)
```

The package holds the pydantic schemas for every request and response the REST API speaks,
and `dirigent-server` imports them, so the client and the server can never disagree about a
shape. It depends on `dirigent-common`, `httpx2`, `pydantic`, and `pyyaml`, and on nothing else in the
workspace.

`docs/python.md` has the worked examples, and `examples/python/` has six runnable scripts.
