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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dig_client-0.1.0.dev6.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.dev6.tar.gz
Algorithm Hash digest
SHA256 a4008642aca75b80369b3dc9d4a90dde474284e0bce65eb722d7d9fe03910fd0
MD5 9daca9360f19624e50279d2470a7c9d7
BLAKE2b-256 c43e1c7ef250ee3d11d1e472a56673188c9cafae99bed4cf36a73ac0710662d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dig_client-0.1.0.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 a1d064ad77ca963d219f61005268f70e6b9c5cf754900cce4a366b50825373c7
MD5 144be990383f3b1a576669d91a3b3c1c
BLAKE2b-256 034a42f50a1b0e003c6c27e6418a6bf59bd429c55d6cc642dd99f39c2d05f709

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