colber-sdk
Official Python SDK for the Colber platform — typed clients for the six v1 services (identity, reputation, memory, observability, negotiation, insurance) plus the platform crypto primitives (did:key Ed25519, RFC 8785 JCS canonicalization, signing helpers).
Mirror of the TypeScript SDK (@colber/sdk@0.1.0). Same surface, same wire format, signatures produced here verify against payloads signed by the TS SDK and vice versa.
Runtime dependencies: httpx (sync) + cryptography (Ed25519 + sha512). No pydantic, no requests, no pynacl.
Install
pip install colber-sdk
The package is PyPI-publishable as colber-sdk, but is not yet released. Use editable install from this repo while in v0.1.0:
pip install -e apps/sdk-python
Quick start
from colber_sdk import ColberClient
from colber_sdk.crypto import generate_did_key, sign_message, canonicalize_jcs
# 1) Mint a fresh DID + Ed25519 keypair (did:key method, multibase z6Mk...).
keys = generate_did_key()
# 2) Point the client at your services. local() targets the β-VM ports.
client = ColberClient.local()
# 3) Register the agent and read its score.
agent = client.identity.register(public_key=keys.public_key_b64, owner_operator_id="op-demo")
envelope = client.reputation.score(did=keys.did)
print(envelope.score) # 500 (base score for a brand-new agent)
# 4) Sign a JCS-canonical payload.
sig = sign_message(
keys.secret_key_b64,
canonicalize_jcs({"did": keys.did, "score": envelope.score}),
)
Convenience constructors
ColberClient.local() # localhost ports 14001..14051
ColberClient.from_base_url("https://api.colber.dev") # future ingress; PROVISIONAL
Errors
ColberApiError— service returned{ ok: false, error: { code, message, details? } }(4xx/5xx).ColberNetworkError— request failed at the transport layer (timeout, fetch error, malformed body).ColberValidationError— local SDK rejected the call before sending. Currently unused, reserved for v0.2.
All three extend ColberError so callers can do a single base catch.
Idempotency
negotiation.start, insurance.subscribe, and insurance.claim accept an optional idempotency_key: str | None = None keyword argument. The SDK forwards it verbatim — generation is the caller's responsibility.
client.negotiation.start(
terms=terms,
created_by="did:key:zA",
idempotency_key="my-unique-key-123",
)
Async support
Synchronous-only in v0.1.0. Async support (AsyncColberClient backed by httpx.AsyncClient) is planned for v0.2 — the public method names will mirror the sync surface with the async/await keywords added.
License
UNLICENSED (private, proprietary). See the root package.json.
Metadata
Release files for colber-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colber_sdk-0.1.1.tar.gz | 26.9 kB | Without provenance | Details for colber_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colber_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for colber_sdk-0.1.1-py3-none-any.whl |
Total release size: 63.0 kB
Release files / colber_sdk-0.1.1.tar.gz
| Download URL | colber_sdk-0.1.1.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56e575abd0782dcc9db7454c2b9e52a3ad3d4c4c65c3501c319994ddbcfa25e4
|
|
BLAKE2b-256 checksum How to use checksums |
c595bf410709df454c0a22ad6723f8f1ba93a433a34b4ff6dca09da8668cc98b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / colber_sdk-0.1.1-py3-none-any.whl
| Download URL | colber_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 36.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf0738be42b5e3f0c942b958bc0095722f3f871770bf2b1262e29f2aa7a69cac
|
|
BLAKE2b-256 checksum How to use checksums |
3aaaa14ffb59cfd575b90c82d99221b6a214ca1b13c0ceba338be5301a75e368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for colber-sdk 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.