Python SDK — Audit
Audit logging and querying in Python.
python
# Sync — POST /audit, GET /events
client.audit.log(
agent="ops-bot", action="deploy", resource="prod",
severity="high", result="blocked",
)
events = client.audit.list(limit=50, result="blocked")
# Async — POST /audit-events, GET /audit-logs
await client.audit.create(
agent="ops-bot", action="deploy", resource="prod",
severity="high", result="blocked",
)
logs = await client.audit.list(limit=50)Sync and async clients use different audit endpoints. Sync uses /audit and /events; async uses /audit-events and /audit-logs (matching the TypeScript SDK).