Skip to main content

Python client SDK for the serialize Foundation audit ledger

Project description

serialize-foundation-sdk (Python)

Python client SDK for the serialize Foundation audit ledger. Mirrors @serializefoundation/foundation-sdk-ts.

Install

pip install serialize-foundation-sdk

Or in editable mode from the monorepo:

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

Quick start

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 for full API reference, conventions, and ADR links. See docs/adr/0005-actor-profile-system.md for why actor/tenantId are excluded from input.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

serialize_foundation_sdk-0.1.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

serialize_foundation_sdk-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file serialize_foundation_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: serialize_foundation_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for serialize_foundation_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47fbe596d956e5d92b1102ffb9b3c0acaa0d22bdbe8a1fac4506847c7d52a9ed
MD5 72ccd9a2572cc6d055a5347f49012c92
BLAKE2b-256 5160a6eeab17e625688bf5ffdbfef193ad10bff1b268ad02fa5defe487d0c438

See more details on using hashes here.

File details

Details for the file serialize_foundation_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for serialize_foundation_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09476e46b26280d90b8f549fb196898ebc738138d659d660eb27294443de2e92
MD5 4f9e99b3d44f183afe7ef3d41d06ea7f
BLAKE2b-256 5e0c7e4c83c56a431eb14969bd97f008717be00bae08ef37d4d6260a94aa7fad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page