A simple Python tool and web app to measure your internet speed using public iperf3 servers.
- Command-line tool (
speedtest.py) for quick speed tests - Modern web interface (Flask app) for easy use in your browser
- Benchmarks multiple servers and finds the fastest
- Shows both download and upload speeds
- Install Python 3.6+
- Install iperf3
- Windows: Download here and add to PATH
- macOS:
brew install iperf3 - Linux:
sudo apt install iperf3
- Install Python dependencies
pip install -r requirements.txt
- Refresh server list:
python speedtest.py refresh
- Benchmark fastest servers:
python speedtest.py bench 3
- Run speed test (download + upload):
python speedtest.py run
Web Interface (screenshots)
- Start the web app:
python app.py
- Open your browser at http://localhost:5000
- Use the buttons:
- Refresh: Get latest server list and ping times
- Bench: Test download speed of fastest servers (number is adjustable)
- Speedtest: Run full download + upload test on the best server
speedtest/
├── speedtest.py # Command-line tool
├── app.py # Flask web app
├── requirements.txt # Python dependencies
├── static/ # CSS, images
├── templates/ # HTML templates
└── cache.json # Server cache (auto-generated)
- Always start with Refresh and Bench before running a full speed test
- The web UI shows results in a clear dashboard and lets you view detailed output
- All results are cached for faster repeated tests
Speedtest.py script forked from: https://github.com/afontenot/speedtest