Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
/ speedtest-poller Public archive

A Python application that runs a Speedtest and saves results in the Firebase Realtime Database

License

Notifications You must be signed in to change notification settings

unite4/speedtest-poller

Repository files navigation

Speedtest Poller

A Python application that runs a Speedtest and saves results in the Firebase Realtime Database.

Running a Docker

Docker instance runs application every 15 minutes by default.

$ ./run-docker.sh

It is also possible to define own time interval, for instance:

$ ./run-docker.sh 1h

Running a single test

Configure Firebase

Certificate

Generate the Firebase private key:

  1. Login to the Firebase console
  2. Choose existing or create a new project
  3. Go to project settings
  4. Go to "Service accounts" tab
  5. Click on the "Generate new private key" button

Put newly generated file in firebase/certificate.json.

Config

Create a configuration file in firebase/config.json with JSON:

{
  "databaseURL": "https://your-firebase-project.firebaseio.com/"
}

More available parameters: https://firebase.google.com/docs/reference/admin/python/firebase_admin#initialize_app.

Setup environment

$ virtualenv .environment
$ source .environment/bin/activate
$ export FIREBASE_CERTIFICATE=firebase/certificate.json
$ export FIREBASE_CONFIG=firebase/config.json

Install dependencies

$ pip install -r requirements.txt

Run application

$ python run-poller.py

About

A Python application that runs a Speedtest and saves results in the Firebase Realtime Database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published