Metadata-Version: 2.5
Name: taskiq-horizon
Version: 0.2.0
Summary: Laravel Horizon port for Python TaskIQ
Project-URL: Repository, https://github.com/JoBinsJP/taskiq-horizon
Project-URL: Issues, https://github.com/JoBinsJP/taskiq-horizon/issues
Author: TaskIQ Horizon Contributors
Author-email: Sajan Lamsal <sajan@jobins.jp>
License: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: alata<0.13,>=0.12.0.1
Requires-Dist: cleo<3.0.0,>=2.1.0
Requires-Dist: fastapi>=0.100
Requires-Dist: psutil>=5.9.0
Requires-Dist: pydantic>=2.0
Requires-Dist: redis[hiredis]>=5.0
Requires-Dist: taskiq-aio-sqs<2.2,>=2.1.1
Requires-Dist: taskiq<0.14,>=0.13.0
Requires-Dist: uvicorn>=0.20
Provides-Extra: dev
Requires-Dist: aiomysql>=0.2; extra == 'dev'
Requires-Dist: aiosqlite>=0.20; extra == 'dev'
Requires-Dist: fakeredis; extra == 'dev'
Requires-Dist: filelock>=4.2.1; extra == 'dev'
Requires-Dist: httpx; extra == 'dev'
Requires-Dist: pre-commit>=4.0; extra == 'dev'
Requires-Dist: pymysql[rsa]>=1.1; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.15; extra == 'dev'
Requires-Dist: virtualenv>=21.14.9; extra == 'dev'
Description-Content-Type: text/markdown

# TaskIQ Horizon

Horizon provides queue monitoring and worker management for Alata, powered by [TaskIQ](https://taskiq-python.github.io/) and inspired by Laravel Horizon.

## Features

- **Real-Time Dashboard**: See pending, completed, silenced, and failed jobs as they happen.
- **Metrics**: Track throughput and runtime metrics for specific queues and jobs over time.
- **Laravel-Style Process Management**: The supervisor supports `auto`, `simple`, and `false` balancing modes, including per-queue autoscaling for Redis, database, and SQS queues.
- **Alata Integration**: One service provider connects your application, console commands, and dashboard.
- **Queue Visibility**: Backlog comes from your job connection; Redis stores Horizon history and metrics.
- **Retry Tracking**: Failed attempts remain pending while automatic retries continue. Dashboard retries receive a fresh retry allowance.

## Documentation

For full installation instructions, architecture overview, and complete configuration details, please refer to the **MkDocs documentation**:

```bash
uv pip install mkdocs-material
mkdocs serve
```

## Quick Installation

Requires Python 3.12 or later. The process manager supports Linux and macOS.

From your Alata application, install Horizon from PyPI:

```bash
uv add taskiq-horizon
```

Compatible Alata and TaskIQ dependencies are installed automatically.

Follow [Installation](docs/installation.md) to configure and register `HorizonProvider`, then run `./alata horizon`.

For package development:

```bash
uv venv
uv pip install 'alata[sqlite,mysql]' -e '.[dev]'
.venv/bin/python -m pytest -q
```

CI runs the suite on Python 3.12, 3.13, and 3.14 with Redis and SQLite, PostgreSQL, or MySQL. SQS API calls are tested with botocore stubs. To include live services locally, set `HORIZON_TEST_REDIS_URL` and `HORIZON_TEST_DATABASE_URL` to disposable test services.

## Local UI Smoke Test

If you want to verify the dashboard UI from this repository checkout without rebuilding the frontend, use the included smoke app:

```bash
cd taskiq-horizon
./.venv/bin/python smoke_dashboard.py
```

Then open [http://127.0.0.1:8000/horizon](http://127.0.0.1:8000/horizon).
