Python client for a local dig daemon — search, organize, reconcile, and export a knowledge base over HTTP.
Project description
dig-client
Python client for a local dig daemon — search, organize, reconcile, and export a knowledge base over HTTP. Dependency-free (standard library only), local-first.
Install
pip install dig-client
Start a daemon next to your KB (dig binary from https://dig.vllnt.com):
dig serve # binds 127.0.0.1:3978 (loopback only)
Use
from dig_client import DigClient
dig = DigClient() # http://127.0.0.1:3978
# search — fts (default), vector, or hybrid (semantic)
hits = dig.find("invoice acme 2024", mode="hybrid", limit=5)
# agent memory — capture, then recall a token-budgeted pack
dig.retain(session_markdown, as_="memory/sessions/today.md")
pack = dig.recall("billing ledger decision", budget=1000)
# reorganize by policy — preview, then apply (reversible)
dig.org(apply=False) # preview the plan
dig.org(apply=True) # commit it
dig.undo() # step back
# reproducible dataset export (JSONL text)
jsonl = dig.export(filter="label:finance")
# read-only inspection
dig.drift()
dig.log()
Target a specific KB with kb="/path/or/name" on any call; omit it to use the
KB at the daemon's working directory. Errors raise DigError carrying the HTTP
status.
The client speaks the same contract as dig serve, a thin adapter over the dig
CLI — so it never drifts from the tool.
Project details
Release history Release notifications | RSS feed
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 dig_client-0.1.0.dev7.tar.gz.
File metadata
- Download URL: dig_client-0.1.0.dev7.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d55c778902854a83a96bbeed8c0c5e0af25e22379a9a21bbd1953889df6047b
|
|
| MD5 |
94e481877591be09bf5f4bfe73cb101d
|
|
| BLAKE2b-256 |
0f7a19c235697a0eeb82d8ec453bb5b0acd8eefa56df9c856208d37d1b5cc856
|
File details
Details for the file dig_client-0.1.0.dev7-py3-none-any.whl.
File metadata
- Download URL: dig_client-0.1.0.dev7-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4ae99b6e25baf4cf1ee50b3596f55f52f223143f6d8fc16b80621a52c651b7
|
|
| MD5 |
4cb187eba603e0feec25e2f1ca8dd3a3
|
|
| BLAKE2b-256 |
d2217f3ca3e75e7ab34c060b5ae489fb0659325d4ec086ffebc749f21e7bf8ea
|