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
pip
pip install hueyMethods
No methods match this filter.
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.
@huey.task→ signature from https://raw.githubusercontent.com/coleifer/huey/master/huey/api.py; official text: “def task(self, retries=0, retry_delay=0, retry_backoff=0, priority=None, context=False, name=None, expires=None, timeout=None, **kwargs): TaskWrapper = self.task_wrapper_class”@huey.periodic_task→ signature from https://raw.githubusercontent.com/coleifer/huey/master/huey/api.py; official text: “def periodic_task(self, validate_datetime, retries=0, retry_delay=0, retry_backoff=0, priority=None, context=False, name=None, expires=None, timeout=None, **kwargs):”
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.