# svinota/pyroute2

Python Netlink and PF_ROUTE library — network configuration and monitoring

Repository: https://github.com/svinota/pyroute2
Canonical: https://ross.abutalabs.com/products/pyroute2
Homepage: https://pyroute2.org/
Language: Python
License: NOASSERTION
License Family: other
Topics: netlink, python, rtnl, namespace, nl80211, nfnetlink, network, linux, netns, genl, generic-netlink, network-namespace, bsd, wireguard, 9p, 9p2000, ethtool, plan9, dhcp
Last push: 2026-06-22T07:52:19+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 67, longevity 100
- inputs: {"age_days": 4895, "days_push": 72, "days_rel": 140, "gap_med": 86, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1064, forks 274 (observed 2026-08-28T04:03:26.584769+00:00)

## What it is
A pure Python library for the Linux netlink protocol and BSD PF_ROUTE, providing message encoding/decoding and socket APIs for network configuration and monitoring. It supports RTNL, nftables, WireGuard, ethtool, nl80211, network namespaces, and more.

## Use cases
- configure linux interfaces routes and addresses from python
- manage network namespaces programmatically
- set up wireguard vpn interfaces
- monitor network settings change events
- configure nftables or ipset rules
- query wifi interface info via nl80211
- run a dhcp client in python

## When to choose
- you need to script or automate Linux network configuration without shelling out to ip/ss commands
- you want fine-grained netlink access from pure Python with no third-party dependencies
- you need to manage network namespaces or monitor kernel network events

## When to avoid
- you need cross-platform network configuration beyond Linux and limited BSD support
- you only need simple high-level networking (sockets, HTTP) rather than kernel-level configuration
- you need a GUI or CLI tool rather than a Python library

## Facets
- artifact type: library
- maturity: active
- function: networking, configuration-management, monitoring, sdk
- domain: networking, operating-systems, developer-tools
- platform: bsd, python
- tags: netlink, rtnl, network-namespaces, wireguard, nftables, nl80211, dhcp, ethtool, pf-route, kernel-interface, automation, linux

## Member repositories
- svinota/pyroute2 (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:26.584769+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:56:06.509281+00:00, confidence not recorded.
  - readme: https://github.com/svinota/pyroute2 (fetched 2026-08-28T04:03:26.584769+00:00, sha c2fca3617001)
  - homepage: https://pyroute2.org/ (fetched 2026-08-29T12:58:23.785756+00:00, sha 42f1e54a4965)
  - site_page: http://docs.pyroute2.org/ (fetched 2026-08-29T12:58:23.794724+00:00, sha d8b672f26154)
  - registry_pypi: https://pypi.org/pypi/pyroute2/json (fetched 2026-08-29T12:58:23.796520+00:00, sha 3a83f4246d2e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
