Skip to main content

QuickRIB

Docs PyPI - Version CI License

BGP routing table reconstruction and analysis, on top of pybgpflux.

A route collector publishes a full dump of its tables every two or eight hours and a stream of update messages in between, so the table at an arbitrary instant has to be reconstructed: the last dump before it, plus every update since. QuickRIB performs that reconstruction once, per collector peer, and exposes the result as a live object. Analysis modules ("observers") attach to it and are notified of every change, so a quantity can be maintained message by message instead of being recomputed from a million-prefix table every few minutes.

  • Reconstructs the table each collector peer held at a given instant, from RIB dumps and updates, and replays the updates that follow
  • Identifies the peers carrying a full table before the build, and can keep only those
  • Drives any number of observers from a single replay, with a result per fixed-length window
  • Built-in observers: AS hegemony, IODA's visible-/24s outage signal, the RIPEstat BGPlay payload, BLT update classification, multi-scale anomaly detection over the hegemony graph
  • Observers reproducing a published signal are tested against the live API
  • Typed throughout, Pydantic configuration

Quick start

pip install quickrib
import datetime
from quickrib import QuickRIB, QuickRIBConfig
from quickrib.observers import UpdateTagsCounter

config = QuickRIBConfig(
    start_time=datetime.datetime(2010, 9, 1, 0, 0),
    end_time=datetime.datetime(2010, 9, 1, 1, 59),
    collectors=["route-views.wide"],
    dump_res=datetime.timedelta(minutes=15),
)

quickrib = QuickRIB.from_config(config)
quickrib.rib.attach_observer(UpdateTagsCounter())
quickrib.run()

The documentation covers the reconstruction, the observer interface and each built-in analysis.

QuickRIB is the data pipeline of When BGP Goes MAD: Multi-Scale Anomaly Detection in Internet Routing (Loye, Bautista and Fontugne, ACM IMC 2026), which introduces the hegemony temporal graphs and the MAD observers it ships with.

Examples

Run with uv run examples/<name>.py.

Development

uv sync --group dev
uv run pytest              # fast, offline suite
uv run pytest -m e2e       # replays real BGP archives (slow, network-bound)
uvx ruff check             # lint
uvx ty check               # type check
uv run mkdocs serve        # docs

See AGENTS.md for the architecture and contributor notes.

Metadata

Release files for quickrib 0.1.0

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

Source distribution (sdist)

Source distribution for quickrib 0.1.0
File Size Uploaded
quickrib-0.1.0.tar.gz 251.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quickrib 0.1.0
File Interpreter ABI Platform
quickrib-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 310.6 kB

Release files / quickrib-0.1.0.tar.gz

Download URL quickrib-0.1.0.tar.gz
Size 251.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6a28f70852a870395e6529e0d5173bcf27fb933de7fbffb1e068650ec2d988bd
BLAKE2b-256 checksum
How to use checksums
47460381e1c9106b08678a359d8805e2631ba2f1df5d1c6466a3c9bc4a0e1139
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / quickrib-0.1.0-py3-none-any.whl

Download URL quickrib-0.1.0-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
862a9545ca2c5a97ad95e0347916d14e1f41592d8d3819b49271bbe2d5fef200
BLAKE2b-256 checksum
How to use checksums
492f0663642a96687edeeda1710eaaedaef03565e368e659584c119acc8fd4e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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