Skip to main content

clusdr Python

A runtime for the cluster. An SDK for the app.

docs PyPI CI Python 3.10+ License

Application SDK for the local Clusdr daemon. This package does not join the cluster.

your process  ──►  clusdr daemon on this host  ──►  the rest of the cluster

Not a database, queue, or Kubernetes. Wire API is v1alpha1. TLS is on by default.

Install

pip install clusdr

CPython 3.10+. Same version train as the daemon.

A running daemon on this host is required:

curl -fsSL https://clusdr.io/install.sh | sh

Linux amd64/arm64, or Docker Hub durguto/clusdr (GHCR: ghcr.io/clusdr/clusdr). Then clusdr init and clusdr start --bootstrap. Guide: first member.

Use

local() dials CLUSDR_GRPC_ADDR or 127.0.0.1:7947, waits on Health, then you own the connection.

from clusdr import local

with local() as c:
    members = c.members()
    leader = c.leader()

    c.publish("deployment", {"sha": "abc"})

    lk = c.lock("scheduler", ttl=15)
    try:
        _ = lk.token
    finally:
        c.unlock("scheduler")

    for event in c.watch():
        # member.join, leader.changed, custom.deployment, …
        ...

    for event in c.watch(topics=["deployment"]):
        # only custom.deployment (no membership snapshot)
        ...

dial is for tests and operators. Apps use local().

One Cluster is safe for unary calls from several threads. Same connection = same holder (unlock is process-wide for that name). One watch() iterator per client.

ttl is seconds. Leaving with (or close()) stops Watch, unlocks, and revokes what this process still holds. Failures raise ClusdrError.

Full surface: Python SDK. Runnable copies (Go, Python, Rust, TypeScript, and Java): examples.

TLS

On unless insecure=True or CLUSDR_TLS=disabled. PEMs (ca.crt, node.crt, node.key) come from data_dir, CLUSDR_DATA_DIR, or ~/.clusdr. Missing files are an error; this client does not skip-verify.

Not in this package

  • Join, promote, or configure the cluster (CLI)
  • Async / asyncio
  • Talking to a remote node's Runtime API as the normal path — put a daemon on that host

Apache-2.0. Contributor checkout (editable + proto regen): CONTRIBUTING.md.

Metadata

Release files for clusdr 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clusdr 0.1.4
File Size Uploaded
clusdr-0.1.4.tar.gz 33.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clusdr 0.1.4
File Interpreter ABI Platform
clusdr-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 76.0 kB

Release files / clusdr-0.1.4.tar.gz

Download URL clusdr-0.1.4.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
92d0facab0e7b38c030cd458562fbc0e29da3dc4d60e077d137a2a31a60a4ec9
BLAKE2b-256 checksum
How to use checksums
98d2d2d1ecc3ad86a6a7a8a42c3c4e63351859941d87a40a9e5d6f234b1b8611
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / clusdr-0.1.4-py3-none-any.whl

Download URL clusdr-0.1.4-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e63a3079ec671b70f6f9488310e3ba1d9c3ad1959b2e418fe72a8ccfa54631b8
BLAKE2b-256 checksum
How to use checksums
8d168c5be55b5a5db2b1880b68c92a41de76778bff2449789ebd68dbbecdbb64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page