skillfed

pybgpkit-parser

Python binding for bgpkit-parser

pybgpkit-parser v0.18.0 106.9K downloads/30d#12,634 on PyPI
Permissive license MIT Active released

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-parser

uv

uv add pybgpkit-parser

poetry

poetry add pybgpkit-parser

Installing 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

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Rust

Tags

BGP parser Pythonparse BGP updatesrouting data extractionAS path analysisBGP route filtering
bgp-routingnetwork-analysisrust-binding

More Internet packages