Skip to main content

Web dashboard and CLI utility for managing PQ queues

Reason this release was yanked:

Missing important frontend files; dashboard won't display

Project description

pq-dashboard

pq-dashboard is a general purpose, lightweight, FastAPI-based web front-end and CLI tool to monitor your PQ queues and tasks.

Sound familiar? Basically, pq-dashboard is to pq as rq-dashboard is to rq.

Quickstart

Installing from PyPI

python -m pip install pq-dashboard

Then run pq-dashboard with no arguments, which will start the server.

$ pq-dashboard

You may need to configure environment variables (see below) to connect to the PostGRES server where your pq queues are stored.

Using docker

pq-dashboard can run as a docker container. The image can be built with ./scripts/build-image.sh. This creates the pq-dashboard:v0 image.

The easiest way to run locally is to use the host network:

docker run --net=host pq-dashboard:v0

The app will then be available on host port 9182 by default. In production, you may want to configure networking differently.

An environment file can be passed to docker like this:

docker run --env-file=.pq-dash.env --net=host pq-dashboard:v0

CLI tool usage

The pq-dashboard command can also be used as a CLI tool for basic queue management.

$ pq-dashboard stats|cleanup|cancel-all <comma-separated list of queue names>

For more details, see the help messages on all the commands

Environment variables

pq-dashboard will read config from environment variables prefixed with PQ_DASH.

Variable Default value Explanation
PQ_DASH_PGHOST localhost Host the PostgreSQL server is running on.
PQ_DASH_PGPORT 5432 Port the PostgreSQL server is running on.
PQ_DASHBOARD_PGUSER postgres PostgreSQL user name to connect as.
PQ_DASHBOARD_PGPASSWORD postgres Password for the PostgreSQL user.
PQ_DASHBOARD_DATABASE postgres PostgreSQL database name containing queue table
PQ_DASHBOARD_QUEUE_TABLE queue Name of queue table containing items

Alternatively, these variables can be stored in a plaintext .pq-dash.env file. Enviroment variables will take precedence over the .env file.

Development

To install dev dependencies, use:

poetry install

Then, install the pre-commit hook:

pre-commit install

This ensures all commits will be linted properly.

To run the dev frontend, from the pq_dashboard/frontend directory run:

npm run dev

then to start the backend:

uvicorn pq_dashboard.main:app --reload --port 9182

The backend statically serves the frontend, but you will need to refresh the page to see your changes in the frontend code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pq-dashboard-0.1.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

pq_dashboard-0.1.0-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

Details for the file pq-dashboard-0.1.0.tar.gz.

File metadata

  • Download URL: pq-dashboard-0.1.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.8.0-63-generic

File hashes

Hashes for pq-dashboard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 213ebc636aa371f2583f615767fa900c42488c55145a74cc0c623ba90e1d9748
MD5 cfc7a4bc47cebcd72cf921df16654e49
BLAKE2b-256 855768a6142e4118ae5299a00ff838052b181a224d9f562fc69fce848e86eaa9

See more details on using hashes here.

File details

Details for the file pq_dashboard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pq_dashboard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 57.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.8.0-63-generic

File hashes

Hashes for pq_dashboard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37e4ff09e7ffaf3d24d75309ffcd791a569574d444d1fc91fd36c4788ff996b8
MD5 50fe725a8021e4b10c58f483cdfed683
BLAKE2b-256 94e858148ec18bfe40fffce075f738c3d23d3c20104e493f2635143f1c8c2769

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page