graph-r
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. - Thread-safe. Every method detaches from the interpreter; driving the
store through
asyncio.to_threadis 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
abi3wheel per platform (Python ≥ 3.12).
Dual-licensed AGPL-3.0-or-later / commercial (contact spicyzhug@gmail.com).
Metadata
Release files for graph-r 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| graph_r-0.1.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for graph_r-0.1.0-cp312-abi3-win_amd64.whl |
| graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64 | Details for graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl |
| graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ ARM64 | Details for graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl |
| graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details for graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
| graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64 | Details for graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl |
Total release size: 12.0 MB
Release files / graph_r-0.1.0-cp312-abi3-win_amd64.whl
| Download URL | graph_r-0.1.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf6c4ffa16c6e163f7c3f0297b16db2d1c0c0bb2e3b06b34def47fccdcebddf1
|
|
BLAKE2b-256 checksum How to use checksums |
ac4304e21672718ca882e1a37da76d981e2967bd61e30097b179cd018a767976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
| Download URL | graph_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7e759fa7eb9614f0618045df207e7ec473e65011ad8a44e934cd59f232774665
|
|
BLAKE2b-256 checksum How to use checksums |
1a15cff302e5343070008c1a642db5f0ba407781cee354c143b97ebc7ee8c8ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl
| Download URL | graph_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ba9be896310fe62da988fb8f8e3a7ed11782a51648c057e30b925a816fbeb02f
|
|
BLAKE2b-256 checksum How to use checksums |
df1d20d317ba41d78df462de5715a4e0b56a7c0a88ec631b764f1c25eea70e45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | graph_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c18dacb7f51d2a65cb4bc7e827c62c3d1eb6ee5a4a419312e983a311484066ef
|
|
BLAKE2b-256 checksum How to use checksums |
ad7bb2467e400f889c00ded273a7a6cdab8d90c4c30c1a75a014d202ab495f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | graph_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a83347fc0f5de8eaf8162b7d77d9ddf14736c9e5383b6c8f8692d0ab1b5221cb
|
|
BLAKE2b-256 checksum How to use checksums |
c8578f8b9f1441f3f458ef67c592c50eb0e5fd6c744cba4a79e60dfa1c41d452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for graph-r 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.