API Reference

Huey

A lightweight task queue for Python with Redis, SQLite, or in-memory storage and periodic tasks.

Official Documentation ↗
CompatibilityThis documentation covers version v3.5.4. Check the official docs for the latest API surface.

Installation

pippip install huey

Methods

Huey queues functions for a consumer process and supports cron-style periodic execution.

Key Features

  • Redis, SQLite, and memory backends
  • Task decorators with retries
  • Crontab-style periodic tasks

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

API reference evidence

Fetched from official sources on 2026-11-08T18:04:00+08:00 via WebFetch https://huey.readthedocs.io/en/latest/api.html;WebFetch https://raw.githubusercontent.com/coleifer/huey/master/huey/api.py.

FAQ

How do I run a consumer?
Start one with huey_consumer.py module.huey, which processes queued tasks and periodic schedules.
Can tasks return values?
Yes. The result is stored in the backend and can be read asynchronously from the returned result handle.
Which backend should I choose?
Redis for production concurrency, SQLite for simple single-host setups, and memory only for tests.