Skip to main content

connekt Python Client SDK

Zero-dependency Python 3.9+ client for connekt-daemon (pure Python standard library) with the same orthogonal API model as the Android and TypeScript SDKs:

  • Root ConnektClient: connect, close, health, peers, refresh_peers, on_peers_changed, subscribe_filter, channel(name), on_any_message
  • Channel ConnektChannel:
    • send(to, data) — single peer_id, multicast sequence Sequence[str], or Target.ALL ("*")
    • request(to, data="", timeout_ms=None) — strict 1-to-1 RPC returning Payload
    • open_stream(to, meta=None) — 0-RTT binary WebSocket stream (with ... as s:, write, try_write, close, abort) supporting single peer, subset list, or Target.ALL
    • on_message(listener) / on_request(handler) / on_stream(handler) — all return Subscription (cancel())
  • Unified types: Payload (.text, .bytes, .json()), OutboundStream, InboundStream (iterable of Payload, meta, reject(reason), cancel(reason)), Target.ALL, Subscription.cancel()

Quick Start (Managed Sidecar)

from connekt import Target, spawn_daemon

with spawn_daemon(binary_path="./connekt-daemon") as daemon:
    client = daemon.client

    # 1. Incoming DATA & stream handler with early meta reject
    msg_sub = client.channel("network").on_message(lambda m: print("HTTP:", m.src, m.text))

    def handle_file(stream):
        if stream.meta.get("mime") == "video/mp4":
            stream.reject("video/mp4 rejected")
            return
        for chunk in stream:
            process_chunk(chunk.bytes)

    stream_sub = client.channel("files").on_stream(handle_file)

    # 2. RPC, multicast send, and binary streaming
    peers = client.refresh_peers()
    targets = [p.peer_id for p in peers[:2]]

    resp = client.channel("echo").request(targets[0], "hello")
    print(resp.text)

    client.channel("notice").send(targets, "group-sync")
    client.channel("notice").send(Target.ALL, "reload")

    with client.channel("files").open_stream(targets, {"mime": "image/png"}) as s:
        s.write(png_bytes)  # auto-chunked into 64 KiB binary WS frames

    msg_sub.cancel()
    stream_sub.cancel()

Quick Start (Connect to Running Daemon)

from connekt import ConnektClient

with ConnektClient("http://127.0.0.1:9527") as client:
    print(client.refresh_peers())

Metadata

Release files for connekt 0.1.0

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

Source distribution (sdist)

Source distribution for connekt 0.1.0
File Size Uploaded Provenance Actions
connekt-0.1.0.tar.gz 11.7 kB With provenance Details for connekt-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 25.6 kB

Release files / connekt-0.1.0.tar.gz

Download URL connekt-0.1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
73644c588c79d1ca82679d636d810b86c27f702f786fe74a569ff464a2dc554c
BLAKE2b-256 checksum
How to use checksums
53208ddfad4813bf9f64ecb8dc8f0b2a5f079c589cde33d15a3f47c2bcc70885
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Release files / connekt-0.1.0-py3-none-any.whl

Download URL connekt-0.1.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab093d5eaaca4e35193bbb982d3b829b0ea8e4fb8f568a8b9290ed449b55781b
BLAKE2b-256 checksum
How to use checksums
f74dcb3054de93bcada86142881a7e64becbd105c845e9c6eab07b061e0b4e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Security for connekt 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for connekt-0.1.0.tar.gz

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 Dec 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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