Metadata-Version: 2.4
Name: serialize-foundation-sdk
Version: 0.1.0
Summary: Python client SDK for the serialize Foundation audit ledger
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# serialize-foundation-sdk (Python)

Python client SDK for the [serialize](https://serialize.local) Foundation audit ledger. Mirrors `@serializefoundation/foundation-sdk-ts`.

## Install

```bash
pip install serialize-foundation-sdk
```

Or in editable mode from the monorepo:

```bash
pip install -e "packages/foundation-sdk-py[dev]"
```

## Quick start

```python
from serialize_foundation_sdk import FoundationClient, SerialisedEventInput, Subject

client = FoundationClient(
    api_key="your-api-key",
    base_url="https://foundation.serialize.local",
)

# Record an event — actor + tenantId are resolved server-side from your API key
event = client.record_event(
    SerialisedEventInput(
        schema_version=1,
        action="create",
        subject=Subject(
            document_id="doc-001",
            version_hash="a" * 64,  # SHA-256 of document content
            document_type="swms",
        ),
    )
)
print(event.event_id)

client.close()
```

See [`CLAUDE.md`](CLAUDE.md) for full API reference, conventions, and ADR links.
See [`docs/adr/0005-actor-profile-system.md`](../../docs/adr/0005-actor-profile-system.md) for why actor/tenantId are excluded from input.
