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.dev4.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.dev4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dig_client-0.1.0.dev4.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.dev4.tar.gz
Algorithm Hash digest
SHA256 dd154c69addc0868b6d394120c16f4c094e018b756956941a6601b756e32189b
MD5 ca99f0a4b0537b7f83142234a835cac3
BLAKE2b-256 73d14be83db9c2b672975a758e964998d6e34975bcd261b4e8d2c30f6539bc0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dig_client-0.1.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 31f13472d54d9742997dbff22f33a4a96098ab81e0b2f03075ff01b4ada384fb
MD5 87b5497816c719cbc51d0f976b5164e8
BLAKE2b-256 9ed636bf3f1ae5d45f314dc46f8b96c9d52d2e29f3e58c96eae12ee2de5c3c6c

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