Skip to main content

graph-r

pip install uu-graph-rimport graph_r (Python ≥ 3.12, one abi3 wheel per platform).

An embedded, persistent knowledge graph. Point it at a URL once; it crawls, distills each page into compact lookup metadata (title, snippet, heading anchors, links), and remembers. From then on, lookups answer locally — with URLs and anchors inside a token budget, never document bodies — and sync keeps the graph fresh for almost nothing: stored ETag validators are replayed on every crawl, so unchanged pages answer 304 and transfer no body, even after a process restart.

import graph_r

store = graph_r.Store.open_or_create("kb")
store.sync("https://docs.example.com/", depth=2)   # crawl → absorb → compact

for hit in store.query("install on linux"):
    print(hit.url, hit.anchor.label if hit.anchor else "", hit.score)

store.sync("https://docs.example.com/", depth=2)   # unchanged: zero bodies
  • One class, one loop. Store.sync seeds an in-memory crawler from the graph, crawls, absorbs, compacts, and discards the crawler — bodies and vectors never outlive the call.
  • References, never bodies. query, related, and due return URLs, titles, snippets, and heading anchors; fetch the page yourself if you want the content.
  • Adaptive freshness. Every document carries a revalidation interval that grows while unchanged and cuts sharply on change; due() lists what to check next, ranked by importance.
  • Any producer. add/touch are the writer seam for corpora that do not arrive by crawl.
  • Thread-safe. Every method detaches from the interpreter; driving the store through asyncio.to_thread is the intended pattern.
  • Durable. An mmapped, checksummed store with write-ahead logging, crash-safe compaction, and lock-protected single-writer / many-reader access — implemented in Rust, shipped as one abi3 wheel per platform (Python ≥ 3.12).

Dual-licensed AGPL-3.0-or-later / commercial (contact spicyzhug@gmail.com).

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

uu_graph_r-0.2.1-cp312-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.12+Windows x86-64

uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

uu_graph_r-0.2.1-cp312-abi3-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

uu_graph_r-0.2.1-cp312-abi3-macosx_10_12_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file uu_graph_r-0.2.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: uu_graph_r-0.2.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for uu_graph_r-0.2.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b2a39c40074e77fd00e87db97008b8bd7c3a28f08b97e4928355fff9a787b86f
MD5 071f7a2d291373b4a9c51d0ad10d25ea
BLAKE2b-256 36613556a34b476734dfc71905f5433df028753dc97f8555b334a6215949fb4b

See more details on using hashes here.

File details

Details for the file uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee48f855921fc568741f63d110925907a4a3c52b521e82335d7a11acbd5f457f
MD5 ee6ea4e3eeb89c788d47fade1d1c568e
BLAKE2b-256 03b3fceff73a9c42e81291f945fdc467942f3604daebcbdcbff23bbbb59dbf6b

See more details on using hashes here.

File details

Details for the file uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uu_graph_r-0.2.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 eac881977afa13afc732fd9f7da4ce5cc2e5560d1e694b5856dff07105bc7b8b
MD5 c827fc7331ccd0b639d58fb38af8ef73
BLAKE2b-256 b0bade1e355c0d90da9086a752e4686ff5a31f333f41eedff0f433c969417069

See more details on using hashes here.

File details

Details for the file uu_graph_r-0.2.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uu_graph_r-0.2.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3915715a333b9276a17f5305aa9d6dfe3e0bcecb51c9c627c37a8559f12ac366
MD5 31f793e825f696b3e7a14d271b1fcdcd
BLAKE2b-256 1e4f4c234bdf398e98126475a89edadf01d6997af3e6e70bba4d6be5cae71510

See more details on using hashes here.

File details

Details for the file uu_graph_r-0.2.1-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for uu_graph_r-0.2.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 11a08d1a9f0850a0f0f28e9281b5fdf20320f594e54af9468bce2fb75296670c
MD5 9f99f4e83ad7da1d731044fca5f64e5a
BLAKE2b-256 8ebdcf044428aba64eb4504a7d32fb392bdce1e902cbc1abd6165378b3df143c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

5 files

0.2.0

5 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page