Metadata-Version: 2.4
Name: finos-ledger-api-client
Version: 0.6.0
Summary: FinOS Ledger API client — the OpenAPI-generated Ledger API client + a dynamic tag.operation façade and typed error taxonomy (Spec 037 / FINOS-246)
Author: FinOS
Keywords: api,client,finos,ledger,sdk
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.13
Requires-Dist: attrs>=23.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: python-dateutil>=2.8.0
Description-Content-Type: text/markdown

# ledger-api-client

A standalone Python client for the FinOS Ledger API (import name
`finos.ledger_api_client`). Extracted from `finos-automation-sdk` (Spec 037 /
FINOS-246) so both the SDK and `apps/platform-api` can call the Ledger API without
pulling the whole automation SDK.

```python
from finos.ledger_api_client import LedgerApiClient

async with LedgerApiClient(base_url, jwt) as client:
    ledgers = await client.api.ledgers.list_ledgers()
    one = await client.api.ledgers.get_ledger(ledger_id="led_1")
```

- `client.api.<tag>.<op>(...)` — operations are **reflected by tag** from the
  OpenAPI-generated client under `_generated/`, so nothing is hand-written and
  nothing needs re-writing when the client is regenerated.
- Each call returns the parsed 2xx body or raises a typed error
  (`finos.ledger_api_client.errors`): 401→`AuthenticationError`,
  403→`AuthorizationError`, 404→`NotFoundError`, 409→`ConflictError`,
  422→`ValidationError`, 5xx/other→`ServerError`.
- Both `base_url` and `jwt` are always required (no env fallback). The client
  never mints and never talks to an auth provider.

**Standalone by design**: depends only on `httpx` + `attrs` + `python-dateutil` —
no `finos.shared`, no `fastapi` — so `finos-automation-sdk` stays
pip-installable on Windmill.

See [AGENTS.md](AGENTS.md) for the full package guide and regeneration steps.
