A sophisticated cross-platform command-line utility for measuring internet speed with precision
Project description
๐ Advanced Speedtest CLI
A sophisticated, cross-platform command-line utility for measuring internet speed with precision. Engineered for accuracy, optimized for performance, and designed for modern networks.
๐ Table of Contents
- โจ Features
- ๐ง System Requirements
- ๐ฆ Installation
- โก Quick Start
- ๐ฏ Usage Guide
- ๐ฌ Advanced Configuration
- ๐ Performance Metrics
- ๐๏ธ Architecture
- ๐ค Contributing
- ๐ Support
โจ Features
Core Capabilities
- ๐ฏ Precision Latency Testing - Real-time WebSocket-based ping measurement with millisecond accuracy
- ๐ฅ Adaptive Download Testing - Multi-threaded parallel connections with intelligent stabilization detection
- ๐ค Dynamic Upload Testing - Configurable concurrent uploads with real-time progress tracking
- ๐ Server Diversity - Automatic server selection or manual picking from global speedtest infrastructure
- ๐ค Dual-Mode Authentication - Seamless support for registered users and anonymous testing
User Experience
- ๐จ Color-Coded Results - Intuitive visual feedback with performance-based color indicators:
- ๐ข Green (1-10ms / Excellent) - Premium connectivity
- ๐ต Cyan (10-60ms / Good) - Solid performance
- ๐ก Yellow (60-120ms / Acceptable) - Adequate connectivity
- ๐ด Red (120+ms / Poor) - Degraded performance
- ๐ Real-Time Progress Visualization - tqdm-powered progress bars for all test phases
- โ๏ธ Configurable Concurrency - Adjust parallel connection count (1-64) for optimal performance
- ๐ Secure Authentication - Cookie-based session management with credential caching
Developer-Friendly
- โก Quick Mode - Launch full speedtest with
--qflag for automation and scripting - ๐ Modular Architecture - Clean separation of concerns with specialized test classes
- ๐ Comprehensive Logging - Detailed error handling and user feedback
- ๐ Asynchronous Operations - Non-blocking ping monitoring concurrent with speed tests
๐ง System Requirements
Minimum Requirements
| Component | Specification |
|---|---|
| Python | 3.7 or higher |
| Memory | 256 MB RAM |
| Network | Stable internet connection |
| OS | Windows, macOS, Linux |
Recommended Setup
| Component | Recommendation |
|---|---|
| Python | 3.9+ for optimal performance |
| Memory | 1 GB RAM or higher |
| Bandwidth | Minimum 1 Mbps for testing |
| OS | Latest stable version |
๐ฆ Installation
Option 1: Install from PyPI (Recommended)
The easiest way - install directly from PyPI:
pip install adv-speedtest-cli
Then run:
adv-speedtest-cli
Option 2: Install from Source
Prerequisites: Ensure Python 3.7+ is installed:
python --version
Step 1: Clone Repository
git clone https://github.com/shakilofficial0/adv-speedtest-cli.git
cd adv-speedtest-cli
Step 2: Install Dependencies
pip install -r requirements.txt
Step 3: Verify Installation
python speedtest.py --help
โก Quick Start
Using PyPI Installation
Quick Mode - Execute immediate speedtest with default settings:
adv-speedtest-cli --q
Interactive Mode - Launch the full-featured menu:
adv-speedtest-cli
Alternative Commands
You can also use these equivalent commands:
advanced-speedtest
speedtest-cli
Using Source Installation
Quick Mode:
python speedtest.py --q
Interactive Mode:
python speedtest.py
Expected Output
โ Ping Test Complete!
Min: 8.62 ms (Very Good)
Max: 9.42 ms (Very Good)
Avg: 9.00 ms (Very Good)
Median: 9.08 ms (Very Good)
Samples: 10
โ Download Complete!
Speed: 276.20 Mbps
Duration: 10.45s
Downloaded: 250.00 MB
โ Upload Complete!
Speed: 255.96 Mbps
Measurement Window: 3-12s (9s)
Uploaded: 40.00 MB
SPEED TEST RESULTS
==================================================
โ Test Complete!
Ping: 9.00 ms (Very Good)
Download: 276.20 Mbps
Upload: 255.96 Mbps
==================================================
๐ฏ Usage Guide
Main Menu Navigation
- Login - Authenticate with speedtest.net account (or skip for anonymous)
- Select Server - Choose testing server or use auto-pick
- Run SpeedTest - Execute comprehensive network analysis
- Run SpeedTest and Share - Test and generate shareable result link
- Settings - Configure test parameters
- Logout - Clear authentication and session data
Settings Configuration
Speedtest Mode
- Single Connection - Conservative testing with 1 parallel connection
- Multiple Connections - Aggressive testing with configurable worker threads
Parallel Connections
- Range: 1 to 64 connections
- Default: 8 connections
- Impact: Higher connections = more aggressive network utilization
Server Selection
0. Auto Pick (Nearest Server)
1-N. Manual Server Selection
Search Server Option (ISP/Location/Name)
๐ฌ Advanced Configuration
Ping Test Protocol
Duration: 10 sequential packets
Timeout: 5 seconds per packet
Protocol: WebSocket (WSS)
Sampling: Real-time measurement
Download Test Strategy
Duration: 10-30 seconds (adaptive)
File Size: 250 MB
Skip Window: First 3 seconds (ramp-up)
Measurement: Overall bytes / total duration
Connections: Configurable (1-64)
Upload Test Strategy
Total Duration: 15 seconds fixed
Measurement Window: 3-12 seconds
Data Size: 40 MB per test
Skip Window: First 3 seconds
Measurement: Bytes in window / 9 seconds
Connections: Configurable (1-64)
๐ Performance Metrics
Speed Calculation Formula
Speed (Mbps) = (Total Bytes ร 8) / (Duration ร 1,000,000)
Accuracy Factors
- Stabilization: 3-second warm-up period to reach peak throughput
- Duration: Longer tests provide more stable results
- Concurrency: Multiple connections reduce per-connection overhead
- Network Conditions: Real-time network state directly impacts measurements
Quality Indicators
| Metric | Threshold | Status |
|---|---|---|
| Ping | โค10ms | Exceptional |
| 10-60ms | Excellent | |
| 60-120ms | Good | |
| >120ms | Needs Improvement | |
| Download | >100 Mbps | Fiber/5G |
| 25-100 Mbps | Broadband | |
| <25 Mbps | Standard | |
| Upload | >20 Mbps | Professional |
| 5-20 Mbps | Standard | |
| <5 Mbps | Limited |
๐๏ธ Architecture
Class Structure
Config
Static configuration and API endpoints management
CookieManager
Persistent session and authentication token storage
LoginManager
User authentication workflow and credential validation
ServerManager
Server discovery, filtering, and auto-selection logic
State
Application state and user session tracking
Display
Terminal UI rendering and menu presentation
PingTest
WebSocket-based latency measurement with color coding
DownloadTest
Adaptive speed measurement with concurrent connection pooling
SpeedTest
Orchestration layer coordinating all test phases
Application
Main event loop and menu interaction handler
Data Flow
User Input
โ
Authentication (Optional)
โ
Server Selection
โ
Test Execution (Ping โ Download โ Upload)
โ
Results Aggregation
โ
Display & Share (Optional)
๐ Key Technologies
| Technology | Purpose | Version |
|---|---|---|
| Python | Core language | 3.7+ |
| asyncio | Asynchronous operations | Built-in |
| websockets | Real-time ping protocol | Latest |
| requests | HTTP/HTTPS communication | Latest |
| tqdm | Progress visualization | Latest |
| colorama | Cross-platform colored output | Latest |
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create feature branch:
git checkout -b feature/enhancement - Implement changes with clear commits
- Test thoroughly before submission
- Submit Pull Request with detailed description
๐ Support
Getting Help
- ๐ง Email: shakilofficial0@gmail.com
- ๐ Issues: GitHub Issues
- ๐ก Discussions: GitHub Discussions
Troubleshooting
Connection Failed
# Verify internet connectivity
ping google.com
# Check firewall/proxy settings
# Disable VPN if active
Import Errors
# Reinstall dependencies
pip install --upgrade -r requirements.txt
# Verify Python version
python --version
Timeout Issues
# Check network stability
# Reduce parallel connections in Settings
# Try with --q (quick mode)
๐ License
This project is licensed under the MIT License - see LICENSE file for details.
๐ Acknowledgments
- Speedtest.net - Infrastructure and testing methodology
- Python Community - Excellent standard library and ecosystem
- Open Source Contributors - All dependencies and inspirations
๐ Project Statistics
Language: Python 3.7+
Lines of Code: 2,600+
Test Coverage: Comprehensive
Platform: Cross-Platform (Windows, macOS, Linux)
Active: โ
Under Active Development
๐ Security & Privacy
- โ HTTPS Only - All connections encrypted
- โ Anonymous Support - Test without account
- โ Local Caching - Credentials stored locally only
- โ No Tracking - Privacy-focused design
- โ Open Source - Code transparency for security auditing
๐ฏ Roadmap
Upcoming Features
- JSON Export - Save results in structured format
- Historical Analysis - Track speed trends over time
- Save and Share Result - Auto Save and Share result in the speedtest
โญ Show Your Support
If this project helped you, please consider:
- โญ Star this repository
- ๐ด Fork and contribute
- ๐ Report issues and suggestions
- ๐ข Share with your network
Created with โค๏ธ by Shakil Ahmed
#NetworkTesting #SpeedTest #Python #CLI #CrossPlatform #OpenSource #Networking #DevTools
Last Updated: January 2026 Version: 1.0.0
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 adv_speedtest_cli-1.0.1.tar.gz.
File metadata
- Download URL: adv_speedtest_cli-1.0.1.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a967e85fd87f3a3ad8c469bebdec27f15fff9a1d9675f1403ab7d24b007b25
|
|
| MD5 |
9718f653861f77b03a2404a0c6e7fc1b
|
|
| BLAKE2b-256 |
5cac52c7174b82a2b285fdff1c56063579f795da5b271ecdde4e3cea315703aa
|
File details
Details for the file adv_speedtest_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: adv_speedtest_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d981704b6e7a8183ac0c0b61e3b9a8f94117af10666b68f53d33e7d1ba40a1d9
|
|
| MD5 |
5181c5daded4ccce63bacfbfd8f7a841
|
|
| BLAKE2b-256 |
502e93dfbfe46aed86fa4f669286a09a42a93d054038f3e859096e4b0118a3e3
|