Metadata-Version: 2.4
Name: aegven-sdk
Version: 0.1.0
Summary: AEGVEN organization-scoped financial infrastructure API client
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# AEGVEN Python SDK

Version 0.1.0. Install the supplied customer development artifact; public registry publication has not been performed.

```sh
python3 -m venv .venv
.venv/bin/python -m pip install ./aegven_sdk-0.1.0-py3-none-any.whl
```

```python
import os
from aegven import Aegven, models

client = Aegven(os.environ['AEGVEN_API_URL'], os.environ['AEGVEN_API_KEY'])
request: models.RegisterObligation = {
    'obligation_type': 'invoice',
    'external_reference': {'namespace': 'company-source', 'id': os.environ['SOURCE_RECORD_ID']},
    'debtor': {'name': 'Recipient company', 'email': 'accounts@example.invalid'},
    'amount_minor': '125000',
    'currency': 'CAD',
    'deadline': '2027-01-05',
    'business_context': {'invoice_number': 'REF-1042'},
}
created = client.register_obligation(request, os.environ['AEGVEN_IDEMPOTENCY_KEY'])
obligation = created.get('obligation')
obligation_id = obligation['id'] if obligation else created['invoice']['id']
payment_request = created.get('payment_request') or client.get_payment_request(obligation_id)
# Persist obligation_id and payment_request['hosted_url'] in your source record.
```

Python is synchronous. Its configurable `timeout` defaults to 15 seconds per blocking socket operation; there is no async client or in-flight cancellation API in this version. Use your worker's execution deadline when scheduling calls. The generated annotations aid static checking; they are not runtime schema validation.

Set the API base URL (including `/api/v1`), server-held machine credential, stable source record ID and durably stored registration key in the named environment variables. Each mutation requires the same exact input and idempotency key on retries. Financial amounts are strings. HTTP 409 requires investigation; an ambiguous network result may already have committed. Query operation lookup or replay the unchanged request. Human access management stays in the individual-account Web Console.

The full SDK guide is supplied with this artifact and served at `/api-docs/sdks.md` by the customer environment. It covers all 33 machine operations, errors, documents, imports, signed webhook verification and status meanings. Phase 0 moves no money.
