pybgpkit-parser
Python binding for bgpkit-parser
What it is and what it does
pybgpkit-parser is a Python binding to a Rust-based BGP parser that reads BGP update messages and route announcements from remote URLs or local files. It exposes individual routing elements (announcements and withdrawals) as structured objects with fields like timestamp, peer IP, AS number, prefix, AS path, and various BGP attributes. The package is designed for network operators and researchers who need to analyze BGP routing data programmatically.
The parser supports filtering by peer IP, origin ASN, prefix, and element type, and offers multiple iteration modes: full object iteration, high-performance tuple projection (for subset fields), and batch processing. It also includes a faster RouteParser variant for scans that only need route identity fields. Caching is optional, and the library exposes utility methods for checking announcement vs. withdrawal, extracting origin ASNs, and serializing to JSON or pipe-separated values.
Use it for:
- Analyze BGP routing announcements and withdrawals from public BGP collectors or private feeds.
- Filter and extract specific routes by peer IP, AS number, or prefix for network topology research.
- Batch-process large BGP update files with minimal memory overhead using tuple projection.
- Monitor route changes and AS path evolution for network security or performance analysis.
- Export BGP data to JSON or PSV format for downstream analysis or archival.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses BGP (Border Gateway Protocol) update and route data from remote or local sources, exposing routing announcements, withdrawals, and path attributes through a Python interface backed by a Rust parser.
Yes, if you work with BGP data. The package is actively maintained, has no known vulnerabilities, supports current Python versions (3.9–3.13), and offers both ease-of-use (simple iteration) and performance (tuple batching, route-level parsing). Medium install friction is acceptable for a compiled binding. Not relevant for projects that do not consume BGP routing data.
Install
pybgpkit-parser on PyPI
pip
pip install pybgpkit-parseruv
uv add pybgpkit-parserpoetry
poetry add pybgpkit-parserInstalling pybgpkit-parser
Before you install
Medium install friction due to compiled Rust bindings; prebuilt wheels available for macOS (x86_64 and ARM64), Linux (x86_64), and Windows (x64) on Python 3.9+. Last release 43 days ago; marked active.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
from pybgpkit_parser import Parser
parser = Parser(
url="https://spaces.bgpkit.org/parser/update-example",
filters={"peer_ips": "185.1.8.65, 2001:7f8:73:0:3:fa4:0:1"},
)
for elem in parser:
print(elem.origin_asns)
Requires Python 3.9 or later; remote data sources must be accessible via HTTP.
Verify before relying
- Performance characteristics and throughput limits for large BGP datasets not quantified in the fact sheet.
- Whether the Rust backend can be built from source on platforms without prebuilt wheels.
- Specific memory overhead when caching large BGP files locally.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 43 days since the last release |
| First released | |
| Downloads | 106,903/month — #12,634 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pybgpkit_parser-0.18.0-cp39-abi3-macosx_10_12_x86_64.whl; pybgpkit_parser-0.18.0-cp39-abi3-macosx_11_0_arm64.whl; pybgpkit_parser-0.18.0-cp39-abi3-manylinux_2_38_x86_64.whl; pybgpkit_parser-0.18.0-cp39-abi3-win_amd64.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
pybgpkitPython bindings for BGPKIT tools that parse BGP…
permissive · top 15,000 on PyPI
pyasnpyasn performs fast offline IP address to…
permissive · top 15,000 on PyPI
adblockparserParses Adblock Plus filter rules and matches…
permissive · top 15,000 on PyPI
sglang-routerA high-performance Rust-based load balancer and…
permissive · top 15,000 on PyPI
peeringdbA Python client library for querying and…
permissive · top 15,000 on PyPI
pyfaup-rsParses URLs into components (scheme, host,…
copyleft · top 15,000 on PyPI
mitmproxy-wireguardImplements a user-space WireGuard server that…
permissive · top 5,000 on PyPI
abnfGenerates parsers from ABNF grammars as…
permissive · top 5,000 on PyPI
sanic-routingSanic-routing is a low-level AST-style router…
permissive · top 5,000 on PyPI
moviepilot-rustProvides Rust-accelerated parsing and filtering…
unclear · top 15,000 on PyPI