Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dig_client-0.1.0.dev8.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dig_client-0.1.0.dev8-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file dig_client-0.1.0.dev8.tar.gz.

File metadata

  • Download URL: dig_client-0.1.0.dev8.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

Hashes for dig_client-0.1.0.dev8.tar.gz
Algorithm Hash digest
SHA256 c052c8da338612e59eac17c79397d4ca5e7516c42fd1dab2b247c7e8af00a305
MD5 b6063a0a28d43a14a78284d4cfbcb4d2
BLAKE2b-256 b9935e204b2754e4285d30df0b509223e08d602d9380ac3af750dc5384eec19b

See more details on using hashes here.

File details

Details for the file dig_client-0.1.0.dev8-py3-none-any.whl.

File metadata

File hashes

Hashes for dig_client-0.1.0.dev8-py3-none-any.whl
Algorithm Hash digest
SHA256 f36783bf2a82c810f47ac53eb3e3fb37a9b1cedaa9401236cc5d7a6787aed7b1
MD5 bf1474d5f6dbb76a99475291614e188e
BLAKE2b-256 80b945cdb0acd1592666b407d063158cc9535d7dff815eb9366adf44fd045a3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page