Skip to content
cbabil edited this page Jul 30, 2025 · 3 revisions

Welcome to the speedtest-logger Wiki!

speedtest-logger is a Python script that runs a speedtest using the official speedtest CLI tool, validates the JSON output against a schema, and then formats the data using a template. The output can be directed to either a file or to standard output.

This wiki provides a comprehensive guide to using and understanding the speedtest-logger project.

Pages

  • Getting Started: This page provides detailed instructions on how to install and use the speedtest-logger.
  • Architecture: This page provides an overview of the project's architecture and folder structure. Getting Started

Getting Started

This page provides detailed instructions on how to install and use the speedtest-logger.

Installation

  1. Clone this repository:
    git clone https://github.com/cbabil/speedtest.git
  2. Create a virtual environment:
    python -m venv venv
  3. Activate the virtual environment:
    • Windows:
      venv\\Scripts\\activate
    • macOS and Linux:
      source venv/bin/activate
  4. Install the project in editable mode:
    pip install -e .
  5. Install the speedtest CLI tool. You can find instructions on the official Speedtest website: https://www.speedtest.net/apps/cli

Usage

speedtest-logger --help
Options
--template: The template to use for formatting the output. Defaults to json.
--schema: The JSON schema to use for validating the speedtest output. Defaults to speedtest/schemas/schemaV1.json.
--out: The destination for the output. Defaults to stdout.
--loglevel: The logging level. Defaults to INFO.
Examples
Run a speedtest and print the JSON output to the console:
speedtest-logger
Run a speedtest and save the output to a file named speedtest.log:
speedtest-logger --out speedtest.log
Run a speedtest and format the output using the influx template:
speedtest-logger --template influx

Clone this wiki locally