Metadata-Version: 2.4
Name: speedtest-cli-ng
Version: 0.2.0
Summary: Next generation CLI for testing internet bandwidth using speedtest.net
Author-email: Michał Korczak <git@omikor.in>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Omikorin/speedtest-cli
Project-URL: Source, https://github.com/Omikorin/speedtest-cli
Project-URL: Issues, https://github.com/Omikorin/speedtest-cli/issues
Keywords: speedtest,speedtest.net,bandwidth,internet,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: System :: Networking
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# speedtest-cli

[![PyPI version](https://img.shields.io/pypi/v/speedtest-cli-ng.svg)](https://github.com/Omikorin/speedtest-cli)
[![PyPI license](https://img.shields.io/pypi/l/speedtest-cli-ng.svg)](https://github.com/Omikorin/speedtest-cli)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/speedtest-cli-ng.svg)](https://github.com/Omikorin/speedtest-cli)
[![CI](https://github.com/Omikorin/speedtest-cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Omikorin/speedtest-cli/actions/workflows/ci.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Omikorin_speedtest-cli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Omikorin_speedtest-cli)

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.

```bash
pip install speedtest-cli-ng
```

#### Using uv

You can run the tool instantly without explicitly managing environments:

```bash
uvx speedtest-cli-ng
```

or install it globally:

```bash
uv tool install speedtest-cli-ng
```

### Usage

To view the available options, run the help command:

```bash
speedtest-cli --help
```

```text
usage: speedtest-cli [-h] [-l] [-s SERVER] [--no-download] [--no-upload]
                     [-t THREADS | --single] [--share] [--bytes] [--json]
                     [--debug] [--version]

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

options:
  -h, --help            show this help message 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 output. (default: ('bit', 1))
  --json                Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s. (default: False)

Miscellaneous Options:
  --debug               Show verbose debugging output. (default: False)
  --version             show program's version number and exit
```

## 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.

```bash
uv sync
```

### Basic workflow

```bash
# 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:

```bash
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](https://github.com/sivel/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](https://github.com/Omikorin/speedtest-cli/blob/main/LICENSE).

---

<p align="center">Made with 🩵 by Michał Korczak</p>

---
