PyBGPKITStream
A drop-in replacement for PyBGPStream using BGPKIT
Features
- Generates time-ordered BGP messages on the fly from RIBs and updates MRT files of multiple collectors
- Stream the same BGP messages as PyBGPStream, enabling seamless, drop-in replacement
- Lazy loading consumes minimal memory, making it suitable for large datasets
- Multiple BGP parsers supported:
pybgpkit(default but slow),bgpkit-parser,bgpdumpandpybgpstreamsingle file backend (the latter three are system dependencies) - Caching with concurrent downloading fully compatible with the BGPKIT parser's caching functionality.
- Performance: for updates, typically 3–10× faster than PyBGPStream; for RIB-only processing, currently about 3–4× slower (see perf.md for test details).
- A CLI tool
Quick start
Installation:
pip install pybgpkitstream
Usage:
import datetime
from pybgpkitstream import BGPStreamConfig, BGPKITStream
config = BGPStreamConfig(
start_time=datetime.datetime(2010, 9, 1, 0, 0),
end_time=datetime.datetime(2010, 9, 1, 1, 59),
collectors=["route-views.wide", "rrc04"],
data_types=["ribs", "updates"],
)
stream = BGPKITStream.from_config(config)
n_elems = 0
for elem in stream:
n_elems += 1
print(f"Processed {n_elems} BGP elements")
or in the terminal:
pybgpkitstream --start-time 2010-09-01T00:00:00 --end-time 2010-09-01T01:59:00 --collectors route-views.sydney route-views.wide --data-types updates > updates.txt
Motivation
PyBGPStream is great but the implementation is complex and stops working when UC San Diego experiences a power outage.
BGPKIT broker and parser are great, but cannot be used to create an ordered stream of BGP messages from multiple collectors and multiple data types.
Missing features
- Live mode for RouteViews collectors
- Some PyBGPStream data interface options like csv or sqlite
Metadata
Release files for pybgpkitstream 0.4.6
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 |
|---|---|---|---|---|
| pybgpkitstream-0.4.6.tar.gz | 15.9 kB | Without provenance | Details for pybgpkitstream-0.4.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybgpkitstream-0.4.6-py3-none-any.whl | Python 3 | none | any | Details for pybgpkitstream-0.4.6-py3-none-any.whl |
Total release size: 35.6 kB
Release files / pybgpkitstream-0.4.6.tar.gz
| Download URL | pybgpkitstream-0.4.6.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2e1b9860ab5e4a425c13c4822073a9b0fbc657a1ee90f8a48b7631975ddccdc
|
|
BLAKE2b-256 checksum How to use checksums |
4f19f2ef073561643450e932aa5db2d2fc744df67d839a0724f2b7cafdeb1f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","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 / pybgpkitstream-0.4.6-py3-none-any.whl
| Download URL | pybgpkitstream-0.4.6-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
126e2b9b38c1adbe0c9007254a63a7bf439724e77825a11e85ed39c370f67c3c
|
|
BLAKE2b-256 checksum How to use checksums |
c47d85b1c195de69f3a5b5549f2479a0def5e047ef55f2b25f79d03bb6e00e67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","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}
|
Security for pybgpkitstream 0.4.6
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.