Skip to main content

A sophisticated cross-platform command-line utility for measuring internet speed with precision

Project description

๐Ÿš€ Advanced Speedtest CLI

PyPI version Python Version Version License Platform

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

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 --q flag 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:

Windows:

pip install adv-speedtest-cli
adv-speedtest-cli

macOS & Linux (Using pipx - Recommended):

# Install pipx if not already installed
sudo apt-get install pipx          # Ubuntu/Debian
brew install pipx                  # macOS

# Install the package
pipx install adv-speedtest-cli

# Configure PATH (important!)
pipx ensurepath

# Restart terminal or run:
source ~/.bashrc  # Linux
# Or manually add to PATH if needed

# Now use the command
adv-speedtest-cli

Linux/macOS (Alternative - Using pip):

pip install adv-speedtest-cli --break-system-packages

# If command not found, run as module:
python3 -m advanced_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

After 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

If Command Not Found

On Linux/macOS after pipx install:

# Option 1: Restart terminal (cleanest)
exit  # or close terminal window and reopen

# Option 2: Reload PATH manually
source ~/.bashrc     # Ubuntu/Debian
source ~/.zprofile   # macOS with zsh
source ~/.bash_profile  # macOS with bash

# Option 3: Run as Python module (always works)
python3 -m advanced_speedtest_cli --q

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

  1. Login - Authenticate with speedtest.net account (or skip for anonymous)
  2. Select Server - Choose testing server or use auto-pick
  3. Run SpeedTest - Execute comprehensive network analysis
  4. Run SpeedTest and Share - Test and generate shareable result link
  5. Settings - Configure test parameters
  6. 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:

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/enhancement
  3. Implement changes with clear commits
  4. Test thoroughly before submission
  5. Submit Pull Request with detailed description

๐Ÿ“ž Support

Getting Help

Troubleshooting

Command Not Found (Ubuntu/Debian)

Issue: After installation, adv-speedtest-cli command is not found.

Solution 1: Using pipx (Recommended)

# If using pip/pip3, uninstall and reinstall with pipx
pip uninstall adv-speedtest-cli

# Install pipx (if not installed)
sudo apt-get install pipx

# Install with pipx
pipx install adv-speedtest-cli

# Configure PATH (IMPORTANT!)
pipx ensurepath

# Restart terminal or reload PATH:
source ~/.bashrc

# Now use the command
adv-speedtest-cli --q

Solution 2: Run as Python module (works immediately)

# If package is already installed, use as module
python3 -m advanced_speedtest_cli

# With quick mode
python3 -m advanced_speedtest_cli --q

# Create alias for convenience (add to ~/.bashrc)
echo 'alias adv-speedtest-cli="python3 -m advanced_speedtest_cli"' >> ~/.bashrc
source ~/.bashrc

Solution 3: Manual PATH configuration

# Add to ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"

# Reload shell
source ~/.bashrc

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


Download files

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

Source Distribution

adv_speedtest_cli-2.1.0.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

adv_speedtest_cli-2.1.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file adv_speedtest_cli-2.1.0.tar.gz.

File metadata

  • Download URL: adv_speedtest_cli-2.1.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for adv_speedtest_cli-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c47be0c47a93cd8ad7b34577ff61c90b1b22ff70adb5cf3bd2a890a20174a80f
MD5 258807020f48d957c79313a823cf1e1b
BLAKE2b-256 91adf0616e67240c842e3c3fcf9c8709adb79ce5c74caf15f31b150d1fae7646

See more details on using hashes here.

File details

Details for the file adv_speedtest_cli-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for adv_speedtest_cli-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11103b68bbee7f87a2f4dea2e863d865c9ea1e44c5ef3ee61789aa3b1ca97655
MD5 c2d9bfe48518c463935dcfbd2f51774a
BLAKE2b-256 c31e90e4cc003988681a51dde3a897ebd96e2f668aeef17b5ee9e82588647779

See more details on using hashes here.

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