Python package to measure the current internet speed and write it to a log file.
- Free software: MIT License
- TODO
Use poetry
for install:
$ # Install poetry using pipx
$ python -m pip install pipx
$ python -m pipx ensurepath
$ pipx install poetry
$ # Clone repository
$ git clone https://github.com/khelfen/internet-speedtest-pi.git
$ cd internet-speedtest-pi/
$ # Install dependencies and hooks
$ poetry install
$ poetry run pre-commit install
Running a speed test once is as simple as running:
$ poetry run python run_speedtest.py
The results will be saved in a newly created results
directory. Running the script
again will append the results to the existing CSV file.
You can use crontab
or other tools to schedule to run the speed test as often as you
like. The bash run_internet_speedtest_pi.sh script provided with this repo is a basic
template on how you can setup a run. Just fill out the marked variables with your local
variables. After that you can add a crontab by running the following:
$ crontab -e
This will create a new cron file if you have not setup one before. To run the script every minute add the following line with your local variables into the cron file.
* * * * * /<path>/<to>/bash /home/<user>/<path>/<to>/run_internet_speedtest_pi.sh
After saving and closing the file start crontab
by running the following:
$ service cron start
After starting crontab
This package was created with Cookiecutter and the elbakramer/cookiecutter-poetry project template.