Skip to main content

Internet Speed Monitor

I've been curious to see how my internet speed varies during the day on my devices. As such, I decided to start collecting data.

Quickstart

Install the package:

pip install netspeedmonitor

Run the app from the command line:

netspeedmonitor app

If you'd like the app to run in the background:

netspeedmonitor app &

Be sure to take note of the process ID (PID) so that you can kill it as necessary.

To view the monitor UI, go to your [localhost in the browser on port 8501 (http://localhost:8501).

How this app works

Underneath the hood, we use the speedtest-cli package to send packets to Ookla's speed testing servers. The results are then logged to a TinyDB. To ensure atomic transactions, we use tinyrecord. Only a single instance of the app can be run per machine, because we use [tendo's] singleinstance module to ensure only a single instance runs on one machine. (Running multiple instances may clog up your internet especially if you are pinging Ookla's speed testing servers frequently, so we only allow a single instance to be run per machine. We use schedule to run speedtest-cli's speed testing functions on a user-configurable interval. Logging is made simple by using loguru The UI is built using streamlit; it was super fast and easy to build, kudos to the team!

Precautions to take

speedtest-cli sends about a few dozens of megabytes of data per test. As such, if you're using metered internet (i.e. one that has a data cap) such as a hotspot on your phone, you'll want to limit the frequency at which you ping Ookla's servers or prevent the process from running in the background.

Your internet speed data is private and yours by default

The open source package stores data in your home directory. By default it will store data at ~/.speedtest.json. (JSON is the default storage format for TinyDB.) You can inspect the source; by design, no measurement data is sent anywhere.

In fact, if you'd like to do your own analysis on the data, here's a code snippet that you can use to analyze it.

from tinydb import TinyDB

db = TinyDB("~/.speedtest.json")
df = pd.DataFrame(db.all())

Contributing and supporting the project

Contributions are welcome; support is even more welcome! Here's how you can help:

  1. Star the repo!
  2. Spread word about it on Twitter.
  3. Help test-drive the app.
  4. Test-drive the app on your Raspberry Pi.
  5. Make PRs to knock items off the roadmap.

Roadmap

  • Changing storage location (lets you back up on cloud storage).

Metadata

Release files for netspeedmonitor 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netspeedmonitor 0.1.1
File Size Uploaded Provenance Actions
netspeedmonitor-0.1.1.tar.gz 5.7 kB Without provenance Details for netspeedmonitor-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netspeedmonitor 0.1.1
File Interpreter ABI Platform Actions
netspeedmonitor-0.1.1-py3-none-any.whl Python 3 none any Details for netspeedmonitor-0.1.1-py3-none-any.whl

Total release size: 12.5 kB

Release files / netspeedmonitor-0.1.1.tar.gz

Download URL netspeedmonitor-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
52dc9e28e1baeca1503c00c5af44d14128afca8d291b7c9dbdb3988f12e49872
BLAKE2b-256 checksum
How to use checksums
97317126fa72b1bee7d665b6741ea3227cefe435a0889ae6a87f69da822bfb0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / netspeedmonitor-0.1.1-py3-none-any.whl

Download URL netspeedmonitor-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18f9980cda9b188766bcdf658dda6e2fea8ec37bde064d35cdfa6d07c43c2a80
BLAKE2b-256 checksum
How to use checksums
65fb01ad96edfa03f247a4fc1a1a6ab0c6ac0de1b9932512ab1fc73e51b59dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Security for netspeedmonitor 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page