Skip to main content

Standalone SnapChore SDK — moment-authenticated hashing, verification, and evidence chains

Project description

snapchore

Standalone Python client for SnapChore — moment-authenticated hashing, verification, sealing, and evidence-chain management.

Install

pip install snapchore

Quick start

from snapchore import SnapChoreClient

client = SnapChoreClient(base_url="https://api.smartblocks.network")
client.authenticate("sbn_live_abc123")

# Capture — hash a payload and register in the ledger
result = client.capture({"event": "signup", "user": "u-42"})
print(result["hash"])

# Verify — confirm a hash matches the payload
ok = client.verify(result["hash"], {"event": "signup", "user": "u-42"})
print(ok["valid"])  # True

# Seal — commit a block to the lattice
block = client.seal(
    {"event": "signup", "user": "u-42"},
    domain="auth.events",
    block_type="event",
)

Features

  • Capture & verify — content-addressed hashing with canonical serialization
  • Seal — commit blocks to the SmartBlocks lattice via the aggregator
  • Chains — create, append, and verify tamper-evident evidence chains
  • Discovery — look up hashes, list recent entries, cross-project receipt search
  • API key management — create, list, and revoke SnapChore-scoped keys
  • Auth — API key, bearer token, and token provider authentication
  • Retry — configurable exponential backoff for transient failures

Auth methods

# API key (most common)
client.authenticate("sbn_live_...")

# Bearer token (console sessions, service-to-service)
client.authenticate_bearer("eyJ...")

Context manager

with SnapChoreClient(base_url="https://api.smartblocks.network") as client:
    client.authenticate("sbn_live_...")
    client.capture({"event": "signup"})
# transport auto-closed

Relationship to sbn-sdk

This package provides a standalone SnapChore client for projects that only need hashing and chain management. If you need the full SmartBlocks Network surface (gateway, governance, lattice, control plane), use sbn-sdk which includes an equivalent client.snapchore sub-client.

For local hashing without network calls, see snapchore-core.

License

MIT

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

snapchore-0.3.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

snapchore-0.3.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file snapchore-0.3.0.tar.gz.

File metadata

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

File hashes

Hashes for snapchore-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cbe5fe5945dfae2ba7f502c999f1190ebde5a42e55163a65ed08c8bf75464e64
MD5 33b3d7c8037629106fa1997da4d8eca3
BLAKE2b-256 2bee2bf6e54d67dfd9fc46ab73154b097b57bb2abd257a7f72c9e8f3ea37cc1c

See more details on using hashes here.

File details

Details for the file snapchore-0.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for snapchore-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc63bf95b27f996fe38214ef5fe5d9c5ec4910e5771c7b283981b2c6ea94ce11
MD5 268c1787ff4409d9271e1c9ba316bad1
BLAKE2b-256 b9600376a2b3d0aa18ae1199169439985bbc4340a22957fc0f2dac6a6b0171a8

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