Skip to content

Monitoring performance data for websites using the lighthouse service

Notifications You must be signed in to change notification settings

jackd248/lighthouse-garden

Repository files navigation

Lighthouse Garden

Lighthouse

PyPI - Python Version PyPI Scrutinizer Code Quality Build Status

Aggregate a performance overview for various target pages using the Google Lighthouse service.

Example dashboard

Features

  • Track multiple target pages
  • Lighthouse audits for performance, accessibility, best practices and SEO
  • Average performance data
  • History performance graph with stored lighthouse reports
  • Informational badges: badge
  • Performance trend indicator

Installation

Prerequisite

The script needs python 3.5 or higher. It is necessary for some additional functionalities to have pip installed on your local machine.

pip

The library can be installed from PyPI:

$ pip3 install lighthouse-garden-kmi

Configuration

The configuration file contains important information about the script processing and target pages.

{
    "export_path": "path/to/export/",
    "keep_history": 10,
    "targets": [
        {
            "title": "Google",
            "identifier": "google",
            "url": "https://www.google.com"
        }
    ]
}

Usage

Run the python script via command line.

$ python3 lighthouse_garden
usage: lighthouse_garden [-h] [-v] [-c CONFIG] [--clear]

Monitoring performance data by lighthouse.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Enable extended console output
  -c CONFIG, --config CONFIG
                        Path to config file
  --clear               Clear all performance data and reset the application

Example shell

Cronjob

Register optionally a cronjob for regularly updates

0 5 * * * python3 lighthouse_garden -c /var/www/html/config.json

Test

Run the script within the DDEV container:

$ ddev start
$ ddev ssh
/var/www/html$ pip3 install -r requirements.txt
/var/www/html$ python3 lighthouse_garden -c tests/config.json

Open http://lighthouse-garden.ddev.site/

Build

The packaging process of the python module is described on python.org.

Credits

About

Monitoring performance data for websites using the lighthouse service

Resources

Stars

Watchers

Forks

Packages

No packages published