Skip to main content

Official Python client for Aeterdum

Project description

Aeterdum Python SDK

Official Python client for Aeterdum, the immutable audit log service.

Installation

pip install aeterdum

Usage

Initialization

import os
from aeterdum import Aeterdum

# Recommended: Use environment variable AETERDUM_API_KEY
client = Aeterdum() 

# For specific regions
# client = Aeterdum(base_url="https://eu.aeterdum.com")

# With signature verification
# client = Aeterdum(server_public_key="0be...")

# Or pass explicitly
# client = Aeterdum(api_key="sk_...")

Ingesting Logs

Ingest an event into the immutable ledger.

with Aeterdum() as client:
    log = client.logs.create(
        event="model.trained",
        actor="pipeline_worker_1",
        payload={
            "accuracy": 0.98,
            "dataset": "v2.1"
        },
        metadata={
            "env": "production"
        }
    )
    
    print(f"Log ID: {log['id']}")

Verifying Logs

Verify the cryptographic integrity of any log entry. This performs three checks locally:

  1. Recomputes the Merkle Root from the provided proof to ensure inclusion in the log tree.
  2. Recomputes the hash of the log payload to ensure the content matches the stored hash (tamper detection).
  3. (If public key provided) Verifies the Ed25519 signature of the root to ensure server authenticity.
result = client.logs.verify("log_12345")

if result.get("client_verified"):
    print("Merkle Proof and Payload Verified")

if result.get("signature_verified"):
    print("Digital Signature Valid")
result = client.logs.verify("log_2023...")

if result.get("client_verified"):
    print(f"Log verified! Merkle Root: {result['merkle_root']}")
else:
    print("Verification failed.")

Listing Logs

retrieve your audit trail for analysis.

logs = client.logs.list(limit=20)

for log in logs["data"]:
    print(f"{log['timestamp']}: {log['event']}")

Async/Sync

Currently, this SDK provides a synchronous interface using httpx.

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

aeterdum-1.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

aeterdum-1.0.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file aeterdum-1.0.2.tar.gz.

File metadata

  • Download URL: aeterdum-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for aeterdum-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2ee55ec8f36bad5bae68e3be60b9d8d9835ae988513eb12137a0ce4339d73a10
MD5 5db104a90a619ae692302f0835036481
BLAKE2b-256 e5a6c7ca13228bd475377633062be351a0d2586e837fe71d76e059d956482ea1

See more details on using hashes here.

File details

Details for the file aeterdum-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: aeterdum-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for aeterdum-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9affc7b9564b1091af0235f3a6cb4040041404ea78d0fceb745dc7451768712b
MD5 77608a88540c5a4f21682c737277b5ae
BLAKE2b-256 5af5c95390db2b464906f4130c8ad6d2c47cf4d5b86c2d66d7683d8babe4807b

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