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.1.0-cp312-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.12+Windows x86-64

uu_graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl (2.5 MB view details)

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

uu_graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

uu_graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

uu_graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: uu_graph_r-0.1.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.5 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.1.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0f9bd1c06304a737e63703b543085c2714f1905812d8faf5fa5509bfe2369b02
MD5 89b6effb8d828e0fc641d02e06cb1e3d
BLAKE2b-256 294065b5b36df77bf8119b9ca7a1cbb82107426fff95444f6ac7ce653e5c1ee8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a6465314c2226bc87de82e3457ef0ced0aad00bfd234dc5fd992a16fefcfc81
MD5 9f2e84eb65b412a97eae3b0fa8557777
BLAKE2b-256 c99ed7eb881c4f59d0f2dfa91831915095dd02da311707c1339a397a5f723e7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 081c6783f134d91d0a444a2d7c371c4134388c7f77aef5d112777f45ce5240a0
MD5 05c176cc26f50f3e30f7f7d6b56c47e5
BLAKE2b-256 f0be3a61cbfb3bbf6359d94a5ab9ab6587ed71539fb2355f5014ccd97870432d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76b6cd1d343bfd2ab9931d4aaabc5ef39fb926177c2ab17390daaf18a8140de0
MD5 a581ac1de998b603732941b6ba05fc88
BLAKE2b-256 5882465d708cc69604055d2049e7ca4c7e5b7066c03917be30ed171f594dc237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 25cdf4e3f523f8533340fbbebae4792940633c0e2687752a1caa464a9efb1b92
MD5 7f2931d782668423b2c4b96fee59599e
BLAKE2b-256 68a98e82b6517ad9d5b9e1dc232167b714c45b3b0cdadd5e0016c0daeca858ad

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

5 files

0.2.0

5 files

This release

0.1.0 This release

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