Metadata-Version: 2.4
Name: smooai-audit
Version: 0.1.0
Summary: Polyglot client SDK for tamper-evident, SQL-queryable audit logging — Python port of @smooai/audit.
Project-URL: Homepage, https://github.com/SmooAI/audit
Project-URL: Repository, https://github.com/SmooAI/audit
Project-URL: Issues, https://github.com/SmooAI/audit/issues
Author-email: SmooAI <brent@smooai.com>
License: MIT
Keywords: audit,audit-log,hash-chain,smooai,tamper-evident
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.7.0
Description-Content-Type: text/markdown

# smooai-audit (Python)

Python port of [`@smooai/audit`](https://github.com/SmooAI/audit) — a polyglot
client SDK for tamper-evident, SQL-queryable audit logging: a canonical
`AuditEvent` schema, canonical JSON serialization, a per-org-per-day SHA-256 hash
chain, and an emit client. Verified byte-for-byte against a shared parity corpus.

> **Status:** scaffold — `canonical_json`, `compute_event_hash`, and
> `AuditClient.emit` are stubbed (`TODO(audit-impl)`).

## Install

```bash
uv add smooai-audit   # or: pip install smooai-audit
```

## Usage

```python
from smooai_audit import AuditClient, AuditClientOptions, AuditEvent

client = AuditClient(AuditClientOptions(endpoint=endpoint, token=token))
client.emit(
    AuditEvent(
        id="...",
        org_id="org_123",
        timestamp="2026-07-14T00:00:00.000Z",
        actor="user_abc",
        action="record.delete",
    )
)
```

## License

MIT © SmooAI
