Network path analyzer: throughput, latency, and packet loss across AS paths
Project description
netpath
Network path analyzer: probe throughput, latency, and packet loss across Autonomous System (AS) paths. Runs mtr/traceroute to a target ASN, measures bidirectional iperf3 throughput to servers inside that ASN, and optionally overlays Cloudflare Radar RUM data for comparison.
Installation
pip install netpath
uvx netpath
uv tool install netpath
System Prerequisites
netpath relies on two external tools for path probing and throughput measurement. Install them before running:
- mtr — primary path prober (falls back to traceroute if unavailable)
- iperf3 — bidirectional throughput measurement (falls back to Cloudflare HTTP speedtest if unavailable)
# macOS
brew install mtr iperf3
# Debian / Ubuntu
sudo apt install mtr-tiny iperf3
# Fedora / RHEL
sudo dnf install mtr iperf3
Usage
Probe a specific ASN
netpath asn AS15169
Options:
-n, --count INTEGER Max servers to test (default: 3)
-d, --duration INTEGER iperf3 seconds per direction (default: 5)
-c, --cycles INTEGER mtr probe cycles (default: 10)
--no-throughput Skip throughput test, trace path only
--cf-token TEXT Cloudflare API token (or set NETPATH_CF_TOKEN)
--json Output results as JSON
Probe top ASNs for a country
netpath country US
Options:
-t, --top INTEGER Number of top ASNs to test (default: 10)
-n, --count INTEGER Max servers per ASN (default: 3)
-d, --duration INTEGER iperf3 seconds per direction (default: 5)
-c, --cycles INTEGER mtr probe cycles (default: 10)
--no-throughput Skip throughput test
--cf-token TEXT Cloudflare API token (or set NETPATH_CF_TOKEN)
Examples
# Probe Google's ASN
netpath asn AS15169
# Probe top 5 UK ISPs
netpath country GB --top 5
# Path-only probe (no throughput test)
netpath asn AS7018 --no-throughput
# JSON output for scripting
netpath asn AS15169 --json | jq .verdict
Cloudflare Radar RUM Overlay
netpath can overlay Cloudflare Radar Real User Monitoring (RUM) quality metrics for each ASN, showing real-world HTTP performance data alongside your own measurements.
To enable it, pass a Cloudflare API token with radar:read permission:
export NETPATH_CF_TOKEN=your_token_here
netpath asn AS15169
Or pass it inline:
netpath asn AS15169 --cf-token your_token_here
Tokens are free. Create one in the Cloudflare dashboard with the radar:read permission scope.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netpath-0.6.0.tar.gz.
File metadata
- Download URL: netpath-0.6.0.tar.gz
- Upload date:
- Size: 246.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc3c7214dad506f5b7b5b899db994ccb1eae75c990e15b5cf17ff18728bcc0ce
|
|
| MD5 |
9b79209cb5a6065ec6518af40e1cd86c
|
|
| BLAKE2b-256 |
337723d9e52a0528a17493f662f071fe99e0a0e416e47ba932431c2641de13e0
|
Provenance
The following attestation bundles were made for netpath-0.6.0.tar.gz:
Publisher:
publish.yml on holynakamoto/netpath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netpath-0.6.0.tar.gz -
Subject digest:
bc3c7214dad506f5b7b5b899db994ccb1eae75c990e15b5cf17ff18728bcc0ce - Sigstore transparency entry: 2038478955
- Sigstore integration time:
-
Permalink:
holynakamoto/netpath@812a1ce3c3e116ee31bbe548178b0e27723b7c0b -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/holynakamoto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@812a1ce3c3e116ee31bbe548178b0e27723b7c0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file netpath-0.6.0-py3-none-any.whl.
File metadata
- Download URL: netpath-0.6.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cbe1d62321a2b9379a75d3c9b3116d14a8d6960cbf5d04819080977be40db57
|
|
| MD5 |
435ec6aa1df1331c36e31fad2e2694f5
|
|
| BLAKE2b-256 |
84be9ce968841fb8af44bf2ba4dad7fc9dd8d2f2e4b0589b3036745ec242f974
|
Provenance
The following attestation bundles were made for netpath-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on holynakamoto/netpath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netpath-0.6.0-py3-none-any.whl -
Subject digest:
8cbe1d62321a2b9379a75d3c9b3116d14a8d6960cbf5d04819080977be40db57 - Sigstore transparency entry: 2038479062
- Sigstore integration time:
-
Permalink:
holynakamoto/netpath@812a1ce3c3e116ee31bbe548178b0e27723b7c0b -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/holynakamoto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@812a1ce3c3e116ee31bbe548178b0e27723b7c0b -
Trigger Event:
push
-
Statement type: