link-r
pip install uu-link-r → import link_r (Python ≥ 3.12, one abi3 wheel per
platform).
A tiny, embeddable crawl-and-resolve link index. Give it a parent URL: it crawls sublinks to a configurable depth, distills keywords and topics from each page, and builds a compact hybrid index (dense embeddings + BM25 + metadata filters). Queries resolve to ranked remote URLs — document bodies stay at the URL and are fetched lazily by the caller.
import link_r
idx = link_r.LinkIndex.open_or_create("kb.lnkr")
idx.update("https://docs.example.com/", depth=2)
idx.save()
for hit in idx.search("how does auth work", k=10):
print(f"{hit.score:.3f} {hit.url}")
# Keep the knowledge base fresh: 304s are free, dead links are evicted.
idx.refresh(ttl_secs=86_400)
- Zero-copy. The on-disk index is the file: search runs against mapped pages with no deserialization step, verified byte-reproducible.
- Hybrid retrieval. Dense embeddings (deterministic hash embedder by
default; ONNX
bge-smallbehind theonnxfeature) fused with BM25 via reciprocal-rank fusion, with categorical prefilters and an optional link-graph boost. - Conditional everything. Stored
ETags becomeIf-None-Match; an unchanged page answers304and transfers no body, and previously indexed links keep the crawl frontier alive through it. - Credential-safe. Tokens are host-scoped, stripped on cross-host redirects, never rendered in debug output; URL userinfo is never persisted.
- Thread-safe. Blocking calls detach from the interpreter; driving the
index through
asyncio.to_threadis the intended pattern. Oneabi3wheel 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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uu_link_r-0.1.0-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: uu_link_r-0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3757bccf050f579dd7ca4ad34f1c65d60eb7e0169d51391961e6dd89f41dfc0
|
|
| MD5 |
af708f3b54b8e9152da3d1c73d4c4e69
|
|
| BLAKE2b-256 |
1a1353c849e90284e4229dafe69af307800178627aaf7f63e8f66886b6e91d1c
|
File details
Details for the file uu_link_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: uu_link_r-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dcd091a2735cfa394ebbacc0fadac0882e0dae913738400f54cdd8334ab8c6e
|
|
| MD5 |
e1e2cdcc6196d3d6ccbd2f61df24edaa
|
|
| BLAKE2b-256 |
459e11e84d152d6052210ab756fd1d80ad7d02535a8bf7ad01efbe59be78d318
|
File details
Details for the file uu_link_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: uu_link_r-0.1.0-cp312-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d9a39d13180fb4afcdb2e4d1e85a0ccadad44c35cb7d5cfdf82e51ecf5dd05a
|
|
| MD5 |
b0c5d18d703c4d50daf4fdcb1dd8661a
|
|
| BLAKE2b-256 |
26dad0ba0f1938a153e8efc5052d2272cab883a19812cfb4ba729b7a9f7bca58
|
File details
Details for the file uu_link_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: uu_link_r-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
700eb3fcd8a3aa8ba29bdddc6dfba975b2a9ab69f6fa387680b752dc77a83fcc
|
|
| MD5 |
fca5ea2f84d0fdfadfa2b12bd53624f4
|
|
| BLAKE2b-256 |
fd67fbd0d8575abf3178fd2a48ce351741fdf23963fc273bf813935bb283a2a5
|
File details
Details for the file uu_link_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: uu_link_r-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.12+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d3c48b6586a70b6015d00ddc4aba04cdb1872308b0f877164d0a61071902be7
|
|
| MD5 |
da111f93fd41264c821aacb8bfb45d6a
|
|
| BLAKE2b-256 |
7262b82e18322711d1ed10181056e7becfe00f0a1995b3561d599765cf52ce18
|