1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""beachcomber — Python client SDK for the comb shell-state daemon.
Quick start::
from beachcomber import Client
client = Client()
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
# Full provider object
result = client.get("git", path="/path/to/repo")
if result.is_hit:
print(result["branch"]) # subscript into dict data
# Force recomputation
client.poke("git", path="/path/to/repo")
# Persistent connection for multiple queries
with client.session() as session:
session.set_context("/path/to/repo")
branch = session.get("git.branch")
host = session.get("hostname")
# List providers and daemon status
providers = client.list()
status = client.status()
"""
=
=