peeringdb
PeeringDB Python client and library
What it is and what it does
peeringdb is a Python client for the PeeringDB API, which maintains a public database of internet peering information including autonomous systems (ASNs), networks, and internet exchange points. It wraps HTTP calls to PeeringDB's REST API through httpx and provides a Pythonic interface for developers to query peering infrastructure data programmatically.
The package is aimed at network operators, system administrators, and developers working with BGP routing and internet peering. It depends on django-peeringdb, confu, munge, pyyaml, and twentyc-rpc to handle configuration, data transformation, and RPC communication. The library is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.
Use it for:
- Query ASN details and network information for BGP route analysis and peering decisions.
- Automate discovery of internet exchange points and peering facilities in a given region.
- Build network topology tools that pull live peering data from PeeringDB.
- Integrate peering information into network monitoring or configuration management systems.
- Validate ASN and network ownership during network provisioning workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for querying and working with PeeringDB data, providing programmatic access to internet peering information including ASNs, networks, and exchange points.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive BSD-2-Clause license. It is well-suited for network operators and developers who need programmatic access to PeeringDB. Install it if you work with BGP, peering infrastructure, or need to query internet exchange data.
Install
peeringdb on PyPI
pip
pip install peeringdbuv
uv add peeringdbpoetry
poetry add peeringdbInstalling peeringdb
Before you install
Low friction install with a pure-Python wheel. Actively maintained with a recent release 39 days ago and commits through 2026-08-14. Depends on six runtime packages including django-peeringdb, httpx, and pyyaml.
License in practice
BSD-2-Clause permissive license allows broad use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects.
Quickstart
pip install peeringdb
import peeringdb
# Query PeeringDB for network or ASN information
result = peeringdb.query('asn', asn_number)
Requires Python 3.10 or later; depends on httpx and other runtime packages for API communication.
Verify before relying
- Whether the package requires PeeringDB API credentials or authentication for all queries.
- Whether django-peeringdb is a required runtime or an optional integration for Django projects.
- Performance characteristics and rate limits when querying large datasets.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — confu, django-peeringdb, httpx, munge, pyyaml, twentyc-rpc |
| Maintenance | actively maintained — 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,863/month — #13,832 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: peeringdb-2.5.0-py3-none-any.whl
Keywords: api, asn, bgp, internet, networking, peering, peeringdb
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-peeringdbProvides Django ORM models and admin interface…
permissive · top 15,000 on PyPI
pyasnpyasn performs fast offline IP address to…
permissive · top 15,000 on PyPI
pybgpkitPython bindings for BGPKIT tools that parse BGP…
permissive · top 15,000 on PyPI
netutilsNetutils provides a collection of utility…
permissive · top 15,000 on PyPI
whoisitQuery RDAP (Registration Data Access Protocol)…
unclear · top 15,000 on PyPI
ipwhoisRetrieves and parses whois and RDAP data for…
permissive · top 15,000 on PyPI
ipinfoQueries the IPinfo.io API to retrieve…
permissive · top 15,000 on PyPI
geoip2fastGeoIP2Fast performs fast geolocation lookups…
permissive · top 15,000 on PyPI
geoip2Queries MaxMind's GeoIP web services and…
permissive · top 5,000 on PyPI
pybgpkit-parserParses BGP (Border Gateway Protocol) update and…
permissive · top 15,000 on PyPI