huey
a little task queue
What it is and what it does
Huey is a task queue library designed to be simple and lightweight, letting you defer work to background processes without heavy infrastructure. You decorate Python functions with @huey.task() to mark them for asynchronous execution, then call them normally—the function returns a result handle immediately while the actual work runs in a separate consumer process. It supports multiple storage backends (Redis, PostgreSQL, SQLite, file-system, or in-memory), multiple execution models (processes, threads, or greenlets), and features like automatic retries, scheduling, recurring tasks, task prioritization, and result caching.
Typical usage involves defining tasks in your application code, then running a separate consumer process (huey_consumer) that picks work off the queue and executes it. Django integration is built in, with optional admin UI for monitoring. The library has no hard dependencies—you only install what you need for your chosen broker—making it a good fit for projects that want task queueing without the complexity of larger systems.
Use it for:
- Send emails or notifications asynchronously without blocking web requests.
- Schedule periodic maintenance tasks like backups or data cleanup using crontab-like syntax.
- Retry flaky operations (API calls, database writes) with configurable delays and attempt limits.
- Process long-running computations in background workers while keeping your web app responsive.
- Coordinate multi-step workflows using task pipelines, chains, and fan-out/map-reduce patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Huey is a lightweight task queue library that lets you run Python functions asynchronously, schedule them for later execution, and manage retries and result storage with minimal setup.
Yes. Huey is actively maintained, has no required dependencies, supports multiple storage backends, and offers a clean API for task queueing. It's well-suited for projects that need background job execution without the operational overhead of larger systems. The only caveat is that the license status is unclear in the fact sheet, so verify the actual license before use in proprietary or restricted contexts.
Install
huey on PyPI
pip
pip install hueyuv
uv add hueypoetry
poetry add hueyInstalling huey
Before you install
Installation is straightforward with no required dependencies—redis-py and psycopg are optional and only needed if you choose Redis or PostgreSQL as your broker. The project is actively maintained with a recent release and solid community adoption.
Quickstart
pip install huey
from huey import RedisHuey
huey = RedisHuey('my-app', host='localhost')
@huey.task()
def add_numbers(a, b):
return a + b
result = add_numbers(1, 2)
print(result()) # Prints 3 after task completes
Requires a running broker (Redis, PostgreSQL, SQLite, or file-system); Redis is the recommended default and requires redis-py to be installed separately if chosen.
Verify before relying
- Whether the package is distributed under an open-source license (license_raw and license_spdx are both null in the fact sheet).
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 21,048,581/month — #1,013 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: huey-3.3.4-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
rqRQ is a Python library for queueing jobs and…
permissive · top 5,000 on PyPI
arqarq provides a job queue system for Python that…
permissive · top 5,000 on PyPI
pydocketDocket is a distributed background task system…
permissive · top 5,000 on PyPI
rq-schedulerAdds job scheduling capabilities to RQ (Redis…
permissive · top 15,000 on PyPI
saqSAQ is an async job queue framework that runs…
permissive · top 15,000 on PyPI
django-rqDjango-RQ integrates RQ (Redis Queue) with…
permissive · top 5,000 on PyPI
b2luigib2luigi wraps luigi to simplify scheduling and…
copyleft · top 15,000 on PyPI
taskiq-redisAdds Redis-based message brokers and result…
permissive · top 5,000 on PyPI
celeryCelery is a distributed task queue that lets…
permissive · top 1,000 on PyPI
hatchet-sdkHatchet SDK is the official Python client for…
permissive · top 5,000 on PyPI