Skip to content

A script to make a bunch of internet speed tests using the Speedtest-cli from Ookla and produce results in JSON.

License

Notifications You must be signed in to change notification settings

reallyaditya/mauritius-speedtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mauritius Internet Speed Test

The aim of this project is to provide a simple python script to make several speedtests using the Speedtest-cli from Ookla and then return the result as a JSON file.

This script is currently being used to fetch data for the project below:

View the Live Website

Data Source

The data source is in the following format:

// file: all-servers.json
{
    "LION": "<SpeedtestResult>",
    "SAFE1": "<SpeedtestResult>",
    "SAFE2": "<SpeedtestResult>",
    "SAFE3": "<SpeedtestResult>",
    "MARS": "<SpeedtestResult>"
}
// Where Speedtest result has the following signature
Interface SpeedtestResult {
    "timestamp": "",
    "upload": "",
    "download": "",
    "ping": ""
}

Project Dependencies

  • Python 3
  • Official Speedtest-cli from Ookla

Project setup

  • Fork this repo to your account

  • Git clone the fork to your local machine

  • Having cloned the repo, change the path of the project directory accordingly in the config.json script.

{
  "projectPath": "{insert path here}"
}
  • Just run the script or run the binary to make speedtests and gather results.
python3 speedtest.py

OR

./speedtest-binary
  • Change the speed test server codes to the ones you want in /data/servers.json
{
  "LION": { "madagascar": 7755 },
  "SAFE": { "india": 24682, "south_africa": 1285, "malaysia": 12544 },
  "MARS": { "rodrigues": 27454 }
}
  • You can get a list of nearby speed test servers and their codes by running the command below:
speedtest --servers

About

A script to make a bunch of internet speed tests using the Speedtest-cli from Ookla and produce results in JSON.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages