Skip to main content

Thin Python SDK for the understand-quickly registry of code-knowledge graphs.

Project description

understand-quickly (Python SDK)

A thin Python client for the understand-quickly registry of code-knowledge graphs.

pip install understand-quickly
  • Sync client (zero runtime deps beyond httpx): Registry
  • Async client (using httpx.AsyncClient): AsyncRegistry
  • CLI: python -m understand_quickly or understand-quickly
  • 60-second in-memory TTL cache by default.

Quick examples

from understand_quickly import Registry

reg = Registry()  # default registry: looptech-ai.github.io/understand-quickly

# 1. List all healthy entries.
entries = reg.list(status="ok")

# 2. Filter by format.
ua = reg.list(format="understand-anything@1")

# 3. Resolve an entry id to its graph body.
graph = reg.get_graph("Lum1104/Understand-Anything")

# 4. Map a GitHub URL back to its registry entry.
hit = reg.find_graph_for_repo("https://github.com/owner/repo")

# 5. Cross-graph concept search (uses stats.json + entry metadata).
results = reg.search("auth", scope="all")

Async equivalent

import asyncio
from understand_quickly import AsyncRegistry

async def main() -> None:
    async with AsyncRegistry() as reg:
        entries = await reg.list(status="ok")
        graph = await reg.get_graph(entries[0]["id"])
        print(len(graph.get("nodes", [])))

asyncio.run(main())

CLI

understand-quickly list [--status ok] [--format understand-anything@1] [--owner OWNER] [--tag TAG]
understand-quickly get-graph <entry_id>
understand-quickly find <github_url_or_owner/repo>
understand-quickly search <query> [--scope all|entries|concepts]
understand-quickly stats

JSON is emitted by default. Add --pretty for indented JSON (and a compact table for list). Both python -m understand_quickly ... and understand-quickly ... work after install.

Exit codes: 0 success, 1 not-found (get-graph, find), 2 HTTP/parse error, 64 usage error.

Environment variables

Name Purpose Default
UNDERSTAND_QUICKLY_REGISTRY Override the registry base URL. https://looptech-ai.github.io/understand-quickly/

The base URL can also be passed explicitly: Registry("https://my-mirror.example/").

Public types

understand_quickly.types exports TypedDict shapes for the documents this SDK fetches:

  • Entry — one registry entry (matches registry.json).
  • Stats, StatsTotals, StatsKind, StatsLanguage, StatsConceptstats.json shape.
  • WellKnown, WellKnownRepo.well-known/repos.json shape.
  • SearchHit — single result from Registry.search().
  • Graph — opaque dict, shape depends on entry["format"].

Everything is total=False so you can rely on entry.get("status") returning safely.

Development

cd python-sdk
python -m pip install -e ".[dev]"
pytest -q
python -m build .

Release notes

See the project release notes on GitHub. Python SDK versions are tagged pysdk-vX.Y.Z.

License

Apache 2.0 — Copyright (c) 2026 Alex Macdonald-Smith. Registry data covered by the Understand-Quickly Data License 1.0.

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

understand_quickly-0.1.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

understand_quickly-0.1.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file understand_quickly-0.1.1.tar.gz.

File metadata

  • Download URL: understand_quickly-0.1.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for understand_quickly-0.1.1.tar.gz
Algorithm Hash digest
SHA256 45149a569d841f8cdab12c1d2093be380af2ef3fea27faa969dc2bb074ad056e
MD5 d5c03b2ea6d4ea91e4e83063e482aa16
BLAKE2b-256 0ddbbfb7b757559785972ceaea11574038e90d0735b3000284f7dbc25d9798a6

See more details on using hashes here.

File details

Details for the file understand_quickly-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for understand_quickly-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d517fb1a310fe3dc19a3eb0cbd61df1286baed4e74f0dcfd54834aa379860bd
MD5 2547cf745f1e484899cef6acc57f0501
BLAKE2b-256 d019aca2cc87094fb1cee68cd1184a9a96bed6104caeace25cb0ddd5dea69fe5

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