skillfed

huey

a little task queue

huey v3.3.4 21.0M downloads/30d#1,013 on PyPI6,008
License unclear Active released

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 huey

uv

uv add huey

poetry

poetry add huey

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

task queue pythonasync job schedulingbackground task workerredis task queuepython job queuedistributed task executioncron job scheduling
task-queuejob-schedulingbackground-workers

More Python Modules packages