Metadata-Version: 2.4
Name: huey-dashboard
Version: 0.0.1
Summary: Huey Dashboard API
Author: Greg Havekes
License: MIT
Project-URL: Repository, https://github.com/havekes/huey-dashboard
Keywords: huey,dashboard,monitoring,tasks
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.135.1
Requires-Dist: huey>=2.6.0
Requires-Dist: pydantic-settings>=2.13.1
Requires-Dist: psycopg[binary]>=3.2.0
Requires-Dist: python-dotenv>=1.2.2
Requires-Dist: redis>=7.3.0
Requires-Dist: sqlalchemy[asyncio]>=2.0.38
Requires-Dist: uvicorn[standard]>=0.41.0
Requires-Dist: websockets>=16.0
Dynamic: license-file

# huey-dashboard
A monitoring dashboard for Huey tasks.

## Installation

```bash
pip install huey-dashboard
```

## Basic Usage

### 1. Initialize the Dashboard in your FastAPI app

```python
from fastapi import FastAPI
from huey_dashboard import init_huey_dashboard
from my_app.tasks import huey  # Your Huey instance

app = FastAPI()

init_huey_dashboard(
    app,
    huey,
    db_url="postgresql+asyncpg://user:pass@localhost/mydb",
    redis_url="redis://localhost:6379/0",  # Optional, for real-time updates
)
```

### 2. Initialize Worker Signals

In the module where your Huey instance is defined:

```python
from huey import RedisHuey
from huey_dashboard import init_worker_signals

huey = RedisHuey("my-app", url="redis://localhost:6379/0")

init_worker_signals(
    huey,
    db_url="postgresql+asyncpg://user:pass@localhost/mydb",
    redis_url="redis://localhost:6379/0",
)
```

---

## Development Workflow


This project uses `uv` for dependency management and environment isolation.

### Prerequisites

- [uv](https://github.com/astral-sh/uv)

### Setup

```bash
uv sync
```

### Quality Checks

#### Linting & Formatting

```bash
uv run ruff check .
uv run ruff format .
```

#### Type Checking

```bash
uv run ty check
```

#### Testing

```bash
uv run pytest
```
