WebSocket client + appkit for soothe-daemon (Python)
Project description
soothe-client-python
WebSocket client in Python for soothe-daemon.
Peer of soothe-client-go and
@mirasoth/soothe-client.
Install
pip install soothe-client-python
# optional image compaction:
pip install 'soothe-client-python[image]'
# or, in the soothe monorepo workspace:
uv sync --all-packages
Quick start
from soothe_client import WebSocketClient, bootstrap_loop_session, connect_websocket_with_retries
client = WebSocketClient(url="ws://127.0.0.1:8765")
await connect_websocket_with_retries(client)
status = await bootstrap_loop_session(client, resume_loop_id=None)
Layout (RFC-629)
Layer 0 (transport)
| Module | Role |
|---|---|
websocket |
Protocol-1 WebSocketClient |
session |
Connect retries + loop bootstrap |
helpers |
Daemon status / config / skills RPCs |
ws_command_client |
Sync/async command helpers |
protocol_params |
Client-side params models |
intent_hints |
Intent-hint validation + DEFAULT_DELIVERABLE_PHASES |
Layer 1 (soothe_client.appkit)
| Symbol | Role |
|---|---|
DaemonSession |
Dual-socket loop session + iter_turn_chunks (CLI-grade) |
QueryGate |
Single-flight cancel-before-context gating |
EventClassifier / extract_thinking_step |
Deliverable / thinking-step mapping |
SSEBroadcaster |
Drop-on-full SSE-style fan-out |
ConnectionPool / TurnRunner |
Pooled multi-session turn execution |
Idle / soft-complete / compact_* |
Turn lifecycle + optional Pillow compaction |
SessionStore |
Persistence seam (Protocol) |
from soothe_client.appkit import DaemonSession
session = DaemonSession("ws://127.0.0.1:8765")
await session.connect()
await session.send_turn("hello")
async for namespace, mode, data in session.iter_turn_chunks():
...
Shared wire codec and path constants remain in soothe-sdk
(soothe_sdk.wire, soothe_sdk.paths).
Development
From this repository (or the client/python submodule):
make sync-dev # uv sync --extra dev --extra image
make fix # ruff --fix + format
make check # format-check + lint + unit tests
make test # unit + examples
make verify # format-check + lint + test + build
make publish-dry # inspect upload without publishing
make publish # PyPI (trusted publisher in CI, or UV_PUBLISH_TOKEN locally)
| Target | Purpose |
|---|---|
format / format-check |
Ruff format |
lint / lint-fix / fix |
Ruff lint (+ auto-fix) |
test / test-unit / test-examples |
Pytest |
test-coverage |
Coverage HTML under htmlcov/ |
build |
uv build → dist/ |
verify |
Full pre-publish gate |
version-patch / -minor / -major |
Bump VERSION |
Examples live under examples/appkit/ (run with make test-examples).
Release
GitHub Actions:
- CI (
.github/workflows/ci.yml) — format, lint, tests on Python 3.11–3.13 - Release (
.github/workflows/release.yml) — on GitHub Release publish, builds and uploads to PyPI via trusted publishing (skips if theVERSIONalready exists)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soothe_client_python-0.9.4.tar.gz.
File metadata
- Download URL: soothe_client_python-0.9.4.tar.gz
- Upload date:
- Size: 61.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4e4d4551e42007fbf8b3497eea8a0ca39abcd08dae51c00ff882832ba542809
|
|
| MD5 |
4754ded360dcef11b46e01d3073ebb5e
|
|
| BLAKE2b-256 |
e8e126a3b5a9899258df0d3cba90616a77939b2c1580e9c8e0efa46cc5271f07
|
File details
Details for the file soothe_client_python-0.9.4-py3-none-any.whl.
File metadata
- Download URL: soothe_client_python-0.9.4-py3-none-any.whl
- Upload date:
- Size: 71.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3567eb70dc3fdbaf52bb76a60ef3da370e878852ff407c8ac9852c41732555f
|
|
| MD5 |
f0b8895180758902be41351d34a2fd58
|
|
| BLAKE2b-256 |
45f9e7b1cd3978e10c09b85a8843ba4f4092945e55c0c5a297b8d02f05a8871a
|