Skip to main content

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.

Python
PyPI Downloads License
Coverage Quality Gate Status
Reliability Rating Maintainability Rating Security Rating

matador dashboard

pip install matador-dashboard   # the import name is `matador`

Installed as matador-dashboard on PyPI (the name matador was taken), but you import 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, and state tabs (active / waiting / delayed / completed / failed) that swap the job list over HTMX.
  • 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 your redis.asyncio.Redis so matador shares your pool (it never closes a connection it didn't open). Omit it to open its own from url=. 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 /static mount 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.

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

MIT

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

matador_dashboard-0.2.0.tar.gz (589.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matador_dashboard-0.2.0-py3-none-any.whl (132.7 kB view details)

Uploaded Python 3

File details

Details for the file matador_dashboard-0.2.0.tar.gz.

File metadata

  • Download URL: matador_dashboard-0.2.0.tar.gz
  • Upload date:
  • Size: 589.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matador_dashboard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b3604b0e8e91c5b5467be69c2377f905bde72457d79b1b34a9f302e49b3c7e51
MD5 095f34e954de91ba408b9efc7f2334ab
BLAKE2b-256 4d4df5ee62722b91e09a7e7fc1401427684594c414205996f29805f9959772a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for matador_dashboard-0.2.0.tar.gz:

Publisher: release.yml on ilovepixelart/matador

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matador_dashboard-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for matador_dashboard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39f9dc49491dd2b4491b385bb6ec7cded9d87e618b2e6c49b504151bb5984041
MD5 94c2abc7f6c17fdd1ddda1b16eb5f3e3
BLAKE2b-256 e9eed24df516bc7245233c92e0a7c3a443d1b85497592715d98d15ccc02cb01a

See more details on using hashes here.

Provenance

The following attestation bundles were made for matador_dashboard-0.2.0-py3-none-any.whl:

Publisher: release.yml on ilovepixelart/matador

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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