Python client SDK for the beachcomber (comb) shell-state daemon
Project description
beachcomber Python SDK
Python client for the beachcomber (comb) shell-state daemon.
Requirements
- Python 3.9+
- No external dependencies (stdlib only)
- A running
combdaemon
Installation
pip install beachcomber
Or with uv:
uv add beachcomber
Quick start
from beachcomber import Client
client = Client()
# Read a single field
result = client.get("git.branch", path="/path/to/repo")
if result.is_hit:
print(result.data) # "main"
print(result.age_ms) # 234
print(result.stale) # False
# Read a full provider (returns dict)
result = client.get("git", path="/path/to/repo")
if result.is_hit:
print(result["branch"]) # "main"
print(result["dirty"]) # False
# Force recomputation
client.poke("git", path="/path/to/repo")
# List available providers
providers = client.list()
# Daemon status
status = client.status()
Sessions
For multiple queries use a session to reuse a single connection:
with client.session() as session:
session.set_context("/path/to/repo")
branch = session.get("git.branch")
dirty = session.get("git.dirty")
hostname = session.get("hostname")
Custom socket path
client = Client(socket_path="/run/user/1000/beachcomber/sock")
Socket discovery
The SDK discovers the daemon socket at:
$XDG_RUNTIME_DIR/beachcomber/sock$TMPDIR/beachcomber-<uid>/sock/tmp/beachcomber-<uid>/sock
Exceptions
| Exception | When raised |
|---|---|
DaemonNotRunning |
Cannot connect to the socket |
ServerError |
Daemon returns ok: false |
ProtocolError |
Malformed JSON or I/O failure |
CombError |
Base class for all SDK errors |
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 libbeachcomber-0.4.0.tar.gz.
File metadata
- Download URL: libbeachcomber-0.4.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffc96da4936313161352a25996a15222fb8fc44538dd6ca9d80907ee5442e7d1
|
|
| MD5 |
9a7535861ea145163a4b9195a61c2209
|
|
| BLAKE2b-256 |
70802de2b672fcad74813df2262711a2d9e8a6268226fdfca715e081dd69f518
|
Provenance
The following attestation bundles were made for libbeachcomber-0.4.0.tar.gz:
Publisher:
release.yml on NavistAu/beachcomber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libbeachcomber-0.4.0.tar.gz -
Subject digest:
ffc96da4936313161352a25996a15222fb8fc44538dd6ca9d80907ee5442e7d1 - Sigstore transparency entry: 1270534087
- Sigstore integration time:
-
Permalink:
NavistAu/beachcomber@b0ba1108555d7d70b321a36386aebd99d7b56fb1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/NavistAu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0ba1108555d7d70b321a36386aebd99d7b56fb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libbeachcomber-0.4.0-py3-none-any.whl.
File metadata
- Download URL: libbeachcomber-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68cc3433c32e987f6772c028674a545340b4864119971fc8ddd589ec2a396f6c
|
|
| MD5 |
89b3c36041a67b953862a6709d827adf
|
|
| BLAKE2b-256 |
ba9c4055855640607180f7e0057cd0b19ac4b256fe138d72ac1e029732a99b52
|
Provenance
The following attestation bundles were made for libbeachcomber-0.4.0-py3-none-any.whl:
Publisher:
release.yml on NavistAu/beachcomber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libbeachcomber-0.4.0-py3-none-any.whl -
Subject digest:
68cc3433c32e987f6772c028674a545340b4864119971fc8ddd589ec2a396f6c - Sigstore transparency entry: 1270534106
- Sigstore integration time:
-
Permalink:
NavistAu/beachcomber@b0ba1108555d7d70b321a36386aebd99d7b56fb1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/NavistAu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0ba1108555d7d70b321a36386aebd99d7b56fb1 -
Trigger Event:
push
-
Statement type: