Skip to main content

Next generation CLI for testing internet bandwidth using speedtest.net

Project description

speedtest-cli

PyPI version PyPI license PyPI pyversions

Next generation CLI for testing internet bandwidth using speedtest.net

Rebuilt for modern Python 3.12+

Getting started

Installation

PyPI

You can install speedtest-cli-ng from PyPI using either standard Python packaging tools or uv.

Using pip

If you have pip only. You can also use pipx to run the tool without installing.

pip install speedtest-cli-ng

Using uv

You can run the tool instantly without explicitly managing environments:

uvx speedtest-cli-ng

or install it globally:

uv tool install speedtest-cli-ng

Usage

To view the available options, run the help command:

speedtest-cli --help
usage: speedtest-cli [-h] [-l] [-s SERVER] [--no-download] [--no-upload] [-t THREADS | --single]
                     [--share] [--bytes] [--csv | --json] [--csv-delimiter CSV_DELIMITER]
                     [--csv-header] [--source SOURCE] [--timeout TIMEOUT] [--debug] [--version]

Next generation CLI for testing internet bandwidth using speedtest.net.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Core Options:
  -l, --list            Show available speedtest.net servers sorted by distance. (default: False)
  -s SERVER, --server SERVER
                        Specify a server id to test against. (default: None)

Transfer Modifiers:
  --no-download         Do not perform the download test. (default: False)
  --no-upload           Do not perform the upload test. (default: False)
  -t THREADS, --threads THREADS
                        Set the number of concurrent connections instead of using downloaded config. (default: None)
  --single              Use one concurrent connection. Simulates a typical file transfer. (default: False)

Output Options:
  --share               Generate and provide a URL to the speedtest.net share results image. (default: False)
  --bytes               Display values in bytes instead of bits. Does not affect image generation or JSON/CSV output. (default: ('bit', 1))
  --csv                 Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s. (default: False)
  --json                Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s. (default: False)
  --csv-delimiter CSV_DELIMITER
                        Single character delimiter to use in CSV output. (default: ,)
  --csv-header          Print CSV headers and exit. (default: False)

Connection Options:
  --source SOURCE       Bind a source IP address to use for connections. (default: None)
  --timeout TIMEOUT     HTTP timeout in seconds. (default: 10.0)
  --debug               Show verbose debugging output. (default: False)

Development

Requirements

  • Python 3.12+
  • uv 0.11+

Setup project

This will install project's dependencies. Keep in mind that there are no runtime dependencies in production.

uv sync

Basic workflow

# Run format
uv run ruff format --check .

# Run lint
uv run ruff check .

# Run typecheck
uv run pyright

# Run tests
uv run pytest

Building

Build both sdist and wheel package:

uv run build

The output will be in the dist/ directory.

Acknowledgments

This project is a heavily refactored and modernized fork of the original speedtest-cli created by Matt Martz. While the codebase has been completely rewritten to support modern Python standards, concurrent thread pools, and memory-safe streaming, it was built upon the foundational concepts of the original tool.

License

This project is licensed undeer the Apache License 2.0.


Made with 🩵 by Michał Korczak


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

speedtest_cli_ng-0.1.1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

speedtest_cli_ng-0.1.1-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file speedtest_cli_ng-0.1.1.tar.gz.

File metadata

  • Download URL: speedtest_cli_ng-0.1.1.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for speedtest_cli_ng-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c7c555ca71a3384eebb17eaf963fe2ab828a43b79b775d4c819b67227e16b49c
MD5 04e5b753b06c1402190b48c823f9ae8c
BLAKE2b-256 9cd425ea369bff5969d3f9100dd76eb17751f3e158f7798f860597782cc46d16

See more details on using hashes here.

File details

Details for the file speedtest_cli_ng-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: speedtest_cli_ng-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for speedtest_cli_ng-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 498eda949b98c0411e78ac166b9f83daa96dc63a03baca5621082c88e9f2597e
MD5 6f23edf72fb99c34187dd297427c57df
BLAKE2b-256 337a3d9c50d66a8606373a2a7ef55bc8ca5e32694024e1a576c2e4de80d48be2

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