graph-r
pip install uu-graph-r → import 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.syncseeds 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, andduereturn 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/touchare the writer seam for corpora that do not arrive by crawl. -
Lineage. Typed edges (
contains,deriveswith an exact-copy flag,conditions) between documents, read in both directions, a breadth-firstwalkup, down or both ways, and string attributes for large values:store.set_edges(view_col, [(table_col, "derives", True)]) # replaces the set store.walk(table, direction="in", depth=3, kinds=["derives"]) # downstream store.set_attrs(view, {"sql": producing_sql, "type": "VIEW"})
Ids are canonicalised. Every method keys a url exactly as
addstores it: scheme and host lower-cased; userinfo, a default port, one trailing slash and the#fragmentdropped; query parameters sorted (a string that does not parse as a URL is kept verbatim). Sobq://p/d/t#candbq://p/d/tare the same document — give a column its own path segment (bq://p/d/t/c). -
Exhaustive listing.
urls(prefix)returns every live document under a prefix, sorted — not ranked likequery. -
Deterministic release.
close()drops the mapping and the open files now, so the directory can be deleted (Windows refuses while a file is mapped). A store written by another format version raisesFormatVersionError(aGraphRError) withfoundandsupported, and is left untouched: a 0.4 or 0.5 store raisesfound=2, supported=3— drain it with the release that wrote it, then rebuild. -
Thread-safe. Every method detaches from the interpreter; driving the store through
asyncio.to_threadis the intended pattern. -
Many writers. Any number of processes may hold a writable
Storeon one path;open_or_createis safe when they race to create it. Each write holds the commit lock only for its append;with store.transaction() as tx:holds it across a block, so a read-modify-write is serializable and the block commits as one append. A writer that cannot get the lock withinlock_waitseconds (Store.open(path, lock_wait=0.5); ten by default) raisesLockedError(aGraphRError);transaction(wait=...)takesTrue,Falseor a number of seconds. -
Atomic. A write or a block is one checksummed log record: a crash mid-write loses that write whole, never part of it, and nothing before it.
-
Durable. An mmapped, checksummed store with write-ahead logging, crash-safe compaction, and many-writer / many-reader access — implemented in Rust, shipped as one
abi3wheel per platform (Python ≥ 3.12).
Dual-licensed AGPL-3.0-or-later / commercial (contact spicyzhug@gmail.com).
Metadata
Release files for uu-graph-r 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uu_graph_r-0.6.0.tar.gz | 572.1 kB | With provenance | Details for uu_graph_r-0.6.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| uu_graph_r-0.6.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for uu_graph_r-0.6.0-cp312-abi3-win_amd64.whl |
| uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64 | Details for uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl |
| uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ ARM64 | Details for uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl |
| uu_graph_r-0.6.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details for uu_graph_r-0.6.0-cp312-abi3-macosx_11_0_arm64.whl |
| uu_graph_r-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64 | Details for uu_graph_r-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl |
Total release size: 13.7 MB
Release files / uu_graph_r-0.6.0.tar.gz
| Download URL | uu_graph_r-0.6.0.tar.gz |
|---|---|
| Size | 572.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a74378d27e23b07ac512d5ecbc7f2a21761d6e99525967e6fdba314d7a15cd2
|
|
BLAKE2b-256 checksum How to use checksums |
72c2afe71cb697776a04a8bf3c181e2f4f540d54f9002ba6f65b3e271788f13c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / uu_graph_r-0.6.0-cp312-abi3-win_amd64.whl
| Download URL | uu_graph_r-0.6.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
71483ee82768e07c42ab4514b0ded776c718fe22c0af309f0ab6e32ecd07da4f
|
|
BLAKE2b-256 checksum How to use checksums |
ed681810f6c026b450f6c4da92c0b61d838961a93895864aefe4a15d88b5cb59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl
| Download URL | uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3c6e28bbe06de56eb205bcd1242fad303fd2c54b9fafb955b4e7e3cd43b0aff3
|
|
BLAKE2b-256 checksum How to use checksums |
905d0c68e1130d60ecc9006a7d420848467585eb9c5e28bf392b05e02d913723
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl
| Download URL | uu_graph_r-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
43f275c17fe5f1815cd44a8756ed19650f8f6c9f960d4dd362916bcc650d14d5
|
|
BLAKE2b-256 checksum How to use checksums |
0f29f5e7a82e1bb175d767ef96586e821190c4119b0c89a33e266c6b4deb4af0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / uu_graph_r-0.6.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | uu_graph_r-0.6.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
15d471099a428bd3bd36e576c332b24a886c432ac95569a2a148f1d68e954185
|
|
BLAKE2b-256 checksum How to use checksums |
8b4d020a9794d77cbccaf8053a8212f977537e126088b118a829270d47c453fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / uu_graph_r-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | uu_graph_r-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
69e351bd900cea6ed506ae1f78bf153837fa014100b1fcc95a8d1b7f94499d92
|
|
BLAKE2b-256 checksum How to use checksums |
1d77d06d55a71454797b429d7eb52f321b6e319f5d3c3f9a74705f79bd459c5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logSecurity for uu-graph-r 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for uu_graph_r-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.