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

Uploaded CPython 3.12+Windows x86-64

uu_graph_r-0.2.0-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.0-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.0-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.0-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.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: uu_graph_r-0.2.0-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.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 91d828db88d3f096bab2c932372b72028cec9a24a96d750ce6898802cd7c4d0a
MD5 0771e6ddad5d9225736facba8bf3885f
BLAKE2b-256 8954c55638c438a179cfd58a78c390841b377ebf731d7371c17140e20c3ec95f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.2.0-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 621b57538699a74c0571cf0ec6fb693f49e008eac5309181ab24528840459166
MD5 5ad7755a7d082ec3ad8b3ee479bfda8b
BLAKE2b-256 364d37b7ef03d915f8236de8a7da006c4f62819db64af71b9dc723a4b08df401

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.2.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a0ee5ada05baa51f107cd1bf807de735bf403c5ddb80d2249e4095c72ba42dad
MD5 bb56373f0103b3ff3995bf8f23f5eeaa
BLAKE2b-256 cdcbeb03cc5093140a6dcc1e09e3179f43ad28a3269df2ef4e7dccb2d0c9d6e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 54388839b4936854a05ad2c7852f8c21e33bf8425e5f462fe4e520de839f84dc
MD5 8a0ea741ddb703b36cde3e1ead31fda2
BLAKE2b-256 2514b33916ceeb97d3bf8b1f992ae6c9e89aba136ed71d5a65e247b58cbe778b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uu_graph_r-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 70ef6ad87b09a840d4b5a551df6d2fdaf856e4f1975629cd9831c9c491fe0db9
MD5 41da9efc51c8533037eb8093bd509f07
BLAKE2b-256 a5440de0f05ff7dcd569a3ea729594141a631d30866e275799a249aa8614ab73

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

5 files

This release

0.2.0 This release

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