Skip to main content

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-small behind the onnx feature) fused with BM25 via reciprocal-rank fusion, with categorical prefilters and an optional link-graph boost.
  • Conditional everything. Stored ETags become If-None-Match; an unchanged page answers 304 and 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_thread is the intended pattern. One abi3 wheel per platform (Python ≥ 3.12).

Dual-licensed AGPL-3.0-or-later / commercial (contact spicyzhug@gmail.com).

Metadata

Release files for uu-link-r 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uu-link-r 0.4.2
File Size Uploaded Provenance Actions
uu_link_r-0.4.2.tar.gz 435.5 kB With provenance Details for uu_link_r-0.4.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uu-link-r 0.4.2
File Actions
uu_link_r-0.4.2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for uu_link_r-0.4.2-cp312-abi3-win_amd64.whl
uu_link_r-0.4.2-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for uu_link_r-0.4.2-cp312-abi3-manylinux_2_28_x86_64.whl
uu_link_r-0.4.2-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for uu_link_r-0.4.2-cp312-abi3-manylinux_2_28_aarch64.whl
uu_link_r-0.4.2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for uu_link_r-0.4.2-cp312-abi3-macosx_11_0_arm64.whl
uu_link_r-0.4.2-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for uu_link_r-0.4.2-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 13.5 MB

Security for uu-link-r 0.4.2

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.

Select from 6 files

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.

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