Skip to content

datasette/datasette-uptime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datasette-uptime

PyPI Changelog Tests License

Datasette plugin showing uptime at /-/uptime

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-uptime

Usage

Adds an endpint at /-/uptime returning JSON that looks like this:

{
    "started": 355764.709263208,
    "now": 355824.192608208,
    "uptime_seconds": 59.483345208049286,
    "uptime_hours": 0.0165231515625136
}

This shows how long the server has been running.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-uptime
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

About

Datasette plugin showing uptime at /-/uptime

Resources

License

Stars

Watchers

Forks

Contributors

Languages