Skip to main content

An interactive dashboard for monitoring and managing Taskiq tasks.

Project description

taskiq-dashboard

PyPI - Python Version PyPI Checks

Broker-agnostic admin dashboard for Taskiq.

Live demo of UI: https://taskiq-dashboard.danfimov.com/

Installation

To install taskiq-dashboard package, run the following command:

pip install taskiq-dashboard

To pull the Docker image with taskiq-dashboard application , run the following command:

docker pull ghcr.io/danfimov/taskiq-dashboard:latest

Usage

Run with code

  1. Import and connect middleware to your Taskiq broker:

    from taskiq_dashboard import DashboardMiddleware
    
    broker = (
        RedisStreamBroker(
            url=redis_url,
            queue_name="my_lovely_queue",
        )
        .with_result_backend(result_backend)
        .with_middlewares(
            DashboardMiddleware(
                url="http://localhost:8000", # the url to your taskiq-dashboard instance
                api_token="supersecret",  # secret for accessing the dashboard API
                broker_name="my_worker",  # it will be worker name in the dashboard
            )
        )
    )
    
  2. Run taskiq-dashboard with the following code:

    from taskiq_dashboard import TaskiqDashboard
    from your_project.broker import broker  # your Taskiq broker instance
    
    
    def run_admin_panel() -> None:
        app = TaskiqDashboard(
            api_token='supersecret', # the same secret as in middleware
            storage_type='postgresql',  # or 'sqlite'
            database_dsn="postgresql://taskiq-dashboard:look_in_vault@postgres:5432/taskiq-dashboard",
            broker=broker,  # pass your broker instance here to enable additional features (optional)
            host='0.0.0.0',
            port=8000,
        )
        app.run()
    
    
    if __name__ == '__main__':
        run_admin_panel()
    

Run inside docker container

You can use this docker-compose.yml file to run taskiq-dashboard along with PostgreSQL:

services:
  postgres:
    image: postgres:18
    environment:
      POSTGRES_USER: taskiq-dashboard
      POSTGRES_PASSWORD: look_in_vault
      POSTGRES_DB: taskiq-dashboard
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

  dashboard:
    image: ghcr.io/danfimov/taskiq-dashboard:latest
    depends_on:
      - postgres
    environment:
      TASKIQ_DASHBOARD__STORAGE_TYPE: postgres
      TASKIQ_DASHBOARD__POSTGRES__HOST: postgres
      TASKIQ_DASHBOARD__API__TOKEN: supersecret
    ports:
      - "8000:8000"

volumes:
  postgres_data:

You can also run taskiq-dashboard with SQLite by using the following docker-compose.yml file:

services:
  dashboard:
    image: ghcr.io/danfimov/taskiq-dashboard:latest
    environment:
      TASKIQ_DASHBOARD__STORAGE_TYPE: sqlite
      TASKIQ_DASHBOARD__SQLITE__DSN: sqlite+aiosqlite:///taskiq_dashboard.db
      TASKIQ_DASHBOARD__API__TOKEN: supersecret
    volumes:
      - taskiq_dashboard_sqlite:/app/taskiq-dashboard.db
    ports:
      - "8000:8000"

volumes:
  taskiq_dashboard_sqlite:

Configuration

Taskiq-dashboard can run with PostgreSQL or SQLite.

You can configure it using environment variables or by passing parameters directly to the TaskiqDashboard class. For a full list of configuration options, please refer to the Configuration article in documentation.

Development

For development and contributing instructions, please refer to the Contribution guide in documentation.

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

taskiq_dashboard-0.4.4.tar.gz (661.7 kB view details)

Uploaded Source

Built Distribution

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

taskiq_dashboard-0.4.4-py3-none-any.whl (109.4 kB view details)

Uploaded Python 3

File details

Details for the file taskiq_dashboard-0.4.4.tar.gz.

File metadata

  • Download URL: taskiq_dashboard-0.4.4.tar.gz
  • Upload date:
  • Size: 661.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for taskiq_dashboard-0.4.4.tar.gz
Algorithm Hash digest
SHA256 114886a7174b1a645b1e230a6baf217af898483275819f3e62f26a8d7b3a88a4
MD5 749d34083d56ce47241657b5ebd71ede
BLAKE2b-256 4792ba06193710d6b7a93eadac714badb2378313167c0e1721d73fc028813a30

See more details on using hashes here.

File details

Details for the file taskiq_dashboard-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: taskiq_dashboard-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 109.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for taskiq_dashboard-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bddfa60fc3573283144b999707c4d3309793ff85725f77a25c6f2a895230454f
MD5 8b5bc730f8486f1fdc01ca4ed98a752e
BLAKE2b-256 75c18f6a6af0d9e37c31c7d871cde99b1dc4c39d38dd6f511abb222f45d64df3

See more details on using hashes here.

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