Skip to content

larsid/covid-monitor-ssa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covid-client

Server-side COVID-19 monitoring dashboard implemented with the Python standard library. The application mimics the behaviour of the original React client from the covid-monitor project, but renders HTML on the server side. It consumes a COVID data API (defaults to a local endpoint at https://127.0.0.1:8000).

Getting started

  1. (Optional) Create a virtual environment.

  2. Run the development server with:

    python run.py
  3. Navigate to http://127.0.0.1:5000 to view the dashboard.

Running tests

pytest

Configuration

The application understands the following environment variables:

  • COVID_APP_API_URL – base URL for the COVID API (defaults to https://127.0.0.1:8000).
  • COVID_API_TIMEOUT – request timeout in seconds (defaults to 10).
  • COVID_CACHE_TTL – cache lifetime in seconds for API responses (defaults to 600).
  • BIND_IP – optional IP address to bind outgoing API requests to.

The WSGI application factory is available via covid_client.create_app, making it easy to embed in larger Python projects or to provide a custom API client factory for testing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published