An async dashboard for toro queues.
Project description
matador 🗡️
A live, server-rendered dashboard for toro queues - watch queues, inspect jobs, and act on them (retry, remove, promote, pause…) from the browser.
pip install matador-dashboard # the import name is `matador`
Installed as
matador-dashboardon PyPI (the namematadorwas taken), but youimport matador.
What it is
FastAPI + Jinja on the server, HTMX + Tailwind on the page - no SPA, no build step to run. Every queue / tab / page is a real URL, so reload, back/forward and deep-links all work. It reads straight from Redis through toro's async API.
Features
- Queues sidebar with per-state counts, a per-queue activity sparkline (last hour, all queues on one shared scale, failures in red), and state tabs (active / waiting / delayed / completed / failed) that swap the job list over HTMX.
- Health chips per queue: latency (age of the next job in line, warns past 30s), completed/failed counts with failure share, and average duration over the last hour - server-rendered SVG, no chart library.
- Job detail lazy-loaded on expand: data, options, return value, timings, logs, and stack traces - syntax-highlighted server-side (Pygments, no client JS).
- Search within a state by job id or a name/data substring.
- Live updates over SSE - counts refresh as jobs complete, no reload.
- Actions: pause/resume a queue, retry/remove/promote a job, retry-all,
clean a state, and schedulers (run-now / remove) - each behind a styled confirm
dialog (not
window.confirm). - Numbered pagination, a Redis health bar (memory, clients, eviction policy), and a persistent dark / light theme.
Run it
uv run python scripts/seed.py # optional: populate demo data
uv run uvicorn scripts.run:app --reload # http://localhost:8000
scripts/run.py watches a few demo queues; edit the list there, or wire it up yourself.
Integrate into an existing app
matador is an ASGI app - mount it into your FastAPI/Starlette service at any path.
URLs are root_path-aware (Starlette url_for), so a sub-path mount just works.
from fastapi import Depends
from matador import create_app
app.mount(
"/toro",
create_app(
["emails", "billing"],
connection=redis, # share your existing redis pool
dependencies=[Depends(require_admin)], # protect it with your auth
),
)
- Mount anywhere - links, static assets and the SSE stream all carry the mount prefix automatically; works behind a path-stripping reverse proxy too.
connection=- pass yourredis.asyncio.Redisso matador shares your pool (it never closes a connection it didn't open). Omit it to open its own fromurl=. This is also the right way to embed: a mounted sub-app's lifespan doesn't run, so the host should own the connection.dependencies=- applied to every route, so your app's auth gates the dashboard. (The/staticmount isn't covered - wrap the whole mount if the assets themselves need auth.)- Other stacks (Django, Flask, non-Python): run matador standalone and reverse-proxy.
Security
matador ships no auth of its own - it inherits the host app's via
dependencies=, or sits behind an authenticating reverse proxy. An app built
without dependencies logs a warning at startup, because every route
(including delete/retry/pause) is open to whoever can reach it.
- CSRF: the same-origin guard turns on automatically when
dependenciesare configured (auth usually means cookies, and cookies are what make CSRF real). Passrequire_same_origin=explicitly to override. - Stack traces are shown in job detail by default and can leak source
paths or secrets from exception messages -
show_stacktraces=Falsehides them when the audience shouldn't see internals. - The dashboard can do whatever its Redis connection can do; scope that Redis
user/network accordingly. See toro's
docs/security.mdfor the queue-side model.
Standalone is just the no-extras case:
app = create_app(["emails", "billing"], url="redis://localhost:6379")
It serves HTML (an HTMX UI), not a JSON API - point a browser at it.
Develop
Managed with uv; the Astral toolchain throughout.
uv sync # venv + deps + dev group
uv run ruff check . && uv run ruff format . # lint (strict) + format
uv run ty check # type check
uv run pytest # unit + integration (needs Redis on :6379)
uv run pytest -m e2e # Playwright browser tests (run separately)
# rebuild the stylesheet while editing templates/styles
./tailwindcss -i styles/input.css -o matador/static/app.css --watch
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matador_dashboard-0.3.0.tar.gz.
File metadata
- Download URL: matador_dashboard-0.3.0.tar.gz
- Upload date:
- Size: 583.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
569d066e4de02b1f2aef1045eb0ee32ddc739071beb9eda383390d9c4452796d
|
|
| MD5 |
cbb22da4f2a6cfccc25cb0cb567e5e1c
|
|
| BLAKE2b-256 |
17e62cb93e558c95f2f36c8da19804affd5ea71bd10aae2f40195fe1ba5f57eb
|
Provenance
The following attestation bundles were made for matador_dashboard-0.3.0.tar.gz:
Publisher:
release.yml on ilovepixelart/matador
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matador_dashboard-0.3.0.tar.gz -
Subject digest:
569d066e4de02b1f2aef1045eb0ee32ddc739071beb9eda383390d9c4452796d - Sigstore transparency entry: 1801444719
- Sigstore integration time:
-
Permalink:
ilovepixelart/matador@c48e8ae30689ab965476a4bad94f18f296d63b06 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ilovepixelart
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c48e8ae30689ab965476a4bad94f18f296d63b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file matador_dashboard-0.3.0-py3-none-any.whl.
File metadata
- Download URL: matador_dashboard-0.3.0-py3-none-any.whl
- Upload date:
- Size: 138.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4b30b4b7a53c3ca6f882f5d3681e9d5afc33175db23d8fb27981440cb774833
|
|
| MD5 |
943f877fc901e6cb65c732c9b0f173fd
|
|
| BLAKE2b-256 |
68c7365a2f6e0a038ff8e8bbb9e2acfd3a04cd177e7287958cdf591a385c61d6
|
Provenance
The following attestation bundles were made for matador_dashboard-0.3.0-py3-none-any.whl:
Publisher:
release.yml on ilovepixelart/matador
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matador_dashboard-0.3.0-py3-none-any.whl -
Subject digest:
a4b30b4b7a53c3ca6f882f5d3681e9d5afc33175db23d8fb27981440cb774833 - Sigstore transparency entry: 1801445038
- Sigstore integration time:
-
Permalink:
ilovepixelart/matador@c48e8ae30689ab965476a4bad94f18f296d63b06 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ilovepixelart
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c48e8ae30689ab965476a4bad94f18f296d63b06 -
Trigger Event:
push
-
Statement type: