speedtest-cli
Command line interface for testing internet bandwidth using speedtest.net.
Repository: https://github.com/DownloaderZone/Speedtest-Cli
Official Ookla Speedtest CLI
Always use official: For maximum throughput (especially gigabit/multi-gigabit lines), official Ookla latency measurement, and server compatibility, the official Ookla Speedtest CLI binary is recommended.
To remove legacy speedtest-cli and install the official Ookla Speedtest CLI:
sudo apt-get remove speedtest-cli sudo apt-get install curl curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash sudo apt-get install speedtest
This Python CLI automatically detects and delegates to the official Ookla binary when installed on your system. You can force official delegation with --official or force the pure Python implementation with --pure-python.
Supported Python Versions
speedtest-cli requires Python 3.8+ (tested through Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14+).
Legacy Python 2.x and ancient Python 3 (< 3.8) support has been completely removed to ensure high reliability, modern TLS security, and standard library compliance.
Installation
Pip / PyPI
pip install dz-speedtest-cli
or directly from GitHub:
pip install git+https://github.com/DownloaderZone/Speedtest-Cli.git
Github
git clone https://github.com/DownloaderZone/Speedtest-Cli.git cd Speedtest-Cli python setup.py install
Direct Download
curl -Lo speedtest-cli https://raw.githubusercontent.com/DownloaderZone/Speedtest-Cli/master/speedtest.py chmod +x speedtest-cli
Usage
$ speedtest-cli -h
usage: speedtest-cli [-h] [--no-download] [--no-upload] [--single] [--bytes]
[-u {bps,kbps,Mbps,Gbps,B/s,kB/s,MB/s,GB/s,auto}]
[-f {human-readable,json,json-pretty,csv,tsv}]
[-p PROGRESS] [--no-progress] [--share] [--simple] [--csv]
[--csv-delimiter CSV_DELIMITER] [--csv-header] [--json]
[-L] [-s SERVER] [-o HOST] [--exclude EXCLUDE]
[--mini MINI] [-i SOURCE] [-I INTERFACE]
[--timeout TIMEOUT] [--secure] [--no-pre-allocate] [-V]
[-v] [--selection-details] [--accept-license]
[--accept-gdpr] [--official] [--pure-python]
Command line interface for testing internet bandwidth using speedtest.net.
--------------------------------------------------------------------------
https://github.com/DownloaderZone/Speedtest-Cli
options:
-h, --help show this help message and exit
--no-download Do not perform download test
--no-upload Do not perform upload test
--single Only use a single connection instead of multiple. This
simulates a typical file transfer.
--bytes Display values in bytes instead of bits. Does not
affect the image generated by --share, nor output from
--json or --csv
-u, --unit {bps,kbps,Mbps,Gbps,B/s,kB/s,MB/s,GB/s,auto}
Output unit for speed (bps, kbps, Mbps, Gbps, B/s,
kB/s, MB/s, GB/s, auto)
-f, --format {human-readable,json,json-pretty,csv,tsv}
Output format (human-readable, json, json-pretty, csv,
tsv)
-p, --progress PROGRESS
Display progress meter (yes or no)
--no-progress Disable progress meter
--share Generate and provide a URL to the speedtest.net share
results image, not displayed with --csv
--simple Suppress verbose output, only show basic information
--csv Suppress verbose output, only show basic information
in CSV format. Speeds listed in bit/s and not affected
by --bytes
--csv-delimiter CSV_DELIMITER
Single character delimiter to use in CSV output.
Default ","
--csv-header Print CSV headers
--json Suppress verbose output, only show basic information
in JSON format. Speeds listed in bit/s and not
affected by --bytes
-L, --list, --servers
Display a list of speedtest.net servers sorted by
distance
-s, --server, --server-id SERVER
Specify a server ID to test against. Can be supplied
multiple times
-o, --host HOST Specify a server host (e.g. host:port) to test against
--exclude EXCLUDE Exclude a server from selection. Can be supplied
multiple times
--mini MINI URL of the Speedtest Mini server
-i, --source, --ip SOURCE
Source IP address to bind to
-I, --interface INTERFACE
Source network interface to bind to
--timeout TIMEOUT HTTP timeout in seconds. Default 10
--secure Use HTTPS instead of HTTP when communicating with
speedtest.net operated servers
--no-pre-allocate Do not pre allocate upload data. Pre allocation is
enabled by default to improve upload performance. To
support systems with insufficient memory, use this
option to avoid a MemoryError
-V, --version Show the version number and exit
-v, --verbose Logging verbosity (can specify multiple times: -v,
-vv)
--selection-details Show details of the server selection
--accept-license Acknowledge license (for compatibility with Ookla CLI)
--accept-gdpr Acknowledge GDPR notice (for compatibility with Ookla
CLI)
--official Force delegation to official Ookla speedtest CLI
binary
--pure-python Force using the pure-Python speedtest engine
Inconsistency
It is not a goal of this application to be a reliable latency reporting tool.
Latency reported by this tool should not be relied on as a value indicative of ICMP style latency. It is a relative value used for determining the lowest latency server for performing the actual speed test against.
There is the potential for pure Python HTTP-based tests to report results lower than official socket-based tests on high bandwidth connections (gigabit+). For official line rates, install the official Ookla CLI via the instructions above.
Metadata
Release files for dz-speedtest-cli 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dz_speedtest_cli-2.2.0.tar.gz | 25.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dz_speedtest_cli-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.0 kB
Release files / dz_speedtest_cli-2.2.0.tar.gz
| Download URL | dz_speedtest_cli-2.2.0.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
237d0226b0e9605b1477e65118e988de81dcfa8e4cd0d3f6ba9db7e67029bdee
|
|
BLAKE2b-256 checksum How to use checksums |
a6c83b2d7ab31d7da509e84502e69be76613cd89393da7fdeb35f43f090176e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / dz_speedtest_cli-2.2.0-py3-none-any.whl
| Download URL | dz_speedtest_cli-2.2.0-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a1e613523d40a642e16dd81fdd8dc4a8fcc14ef715ca5e68f6b2faa8f9ead5e
|
|
BLAKE2b-256 checksum How to use checksums |
aa3f16ae766f05f435c809858a40606e7ba2d7d87529a24e6e25f8ed30622508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|