Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netpath-0.3.0.tar.gz (188.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netpath-0.3.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file netpath-0.3.0.tar.gz.

File metadata

  • Download URL: netpath-0.3.0.tar.gz
  • Upload date:
  • Size: 188.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netpath-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f6c6e75db20a9a21753b9f0fbcaad1f4f5ad0dfadd8a26e3e8de4379492904db
MD5 1fc324992e81369b6aa53acc29b13110
BLAKE2b-256 f37ceb62e2714735e58ede70ab354480308780ef80e1060bf7ab4acc67ee478d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netpath-0.3.0.tar.gz:

Publisher: publish.yml on holynakamoto/netpath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netpath-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: netpath-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netpath-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac0e034cb7ee8e102fbebbe35c064c9d292fe3b10e1798dfb2570785acff90db
MD5 0c75319824d167e2e7fb01527372d5ba
BLAKE2b-256 68093bfb5d3fa6ef2f0e1072d8ab0d60ca6ce922ff202bae6f6c744ffd27addf

See more details on using hashes here.

Provenance

The following attestation bundles were made for netpath-0.3.0-py3-none-any.whl:

Publisher: publish.yml on holynakamoto/netpath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page