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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dig_client-0.1.0.dev5.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.dev5.tar.gz
Algorithm Hash digest
SHA256 b27ee355fd5a906898d3b646d0f959b2607e8d264648d79e6d5d37fb2f46f539
MD5 26ccc4c88e8f69038d8a222b1d2d9bbb
BLAKE2b-256 84fe0ddcbc287963303ec269cae0e1b14105340df6d59630b3133f17f74dbf17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dig_client-0.1.0.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c5c9bc57da7a8aa6f31f38edc0e6aedf636362b8f5c3b289253969ff4e7b0b1
MD5 3f8b0cbb2bbea73ef9612fff729a44eb
BLAKE2b-256 e49d8abdb838b6187f7760ba954db1e1194ab1adaac5fc8a547c5532e03dd410

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