rq
RQ is a simple, lightweight, library for creating background jobs, and processing them.
What it is and what it does
RQ is a job queue library that lets you offload long-running or blocking function calls to background workers. You define a function, enqueue it with arguments, and RQ stores the job in Redis; separate worker processes pick up and execute jobs asynchronously. It supports job prioritization across multiple queues, scheduled execution at specific times or intervals, cron-style scheduling, automatic retries on failure, and webhooks to notify external systems when jobs finish or fail.
The library is designed for low barrier to entry—basic usage requires only Redis and a few lines of Python—while scaling to high-volume systems. It integrates into web frameworks easily and handles job deduplication, repeating jobs with configurable intervals, and custom serializers. Workers can run as single processes or in pools, and the package includes built-in scheduling via the `rq cron` command.
Use it for:
- Send emails or notifications asynchronously without blocking web requests
- Schedule periodic maintenance tasks (database cleanup, report generation) using cron syntax or fixed intervals
- Process long-running computations (image resizing, data analysis) in background workers while keeping the web tier responsive
- Retry failed jobs automatically with configurable backoff intervals
- Prioritize urgent tasks by enqueueing them to high-priority queues that workers process first
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
RQ is a Python library for queueing jobs and processing them in the background with workers, backed by Redis or Valkey. It handles job scheduling, prioritization, retries, and webhooks with a simple API.
Yes. RQ is production-stable, actively maintained, has no known vulnerabilities, and low install friction. It solves a common problem (background job processing) with a straightforward API and reasonable defaults. The pickle security warning is documented and mitigated by using JSONSerializer for untrusted inputs. Suitable for projects of any size that need job queueing backed by Redis.
Install
rq on PyPI
pip
pip install rquv
uv add rqpoetry
poetry add rqInstalling rq
Before you install
Low install friction with a pure-Python wheel. Active maintenance with recent releases; last commit 2026-08-14. Requires Redis >= 5 or Valkey >= 7.2 as a runtime dependency, not bundled.
License in practice
BSD-2-Clause (permissive) allows commercial use, modification, and distribution with minimal restrictions. Suitable for proprietary projects.
Quickstart
pip install rq
from redis import Redis
from rq import Queue
queue = Queue(connection=Redis())
job = queue.enqueue(my_function, arg1, arg2)
Requires a running Redis (>= 5) or Valkey (>= 7.2) instance; rq will not work without it. Python >= 3.10 required.
Verify before relying
- Whether pickle deserialization security risk (noted in docs) affects typical production deployments or only untrusted Redis sources
- Performance overhead of Worker vs SimpleWorker in typical real-world workloads beyond the microbenchmark cited
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, croniter, redis |
| Maintenance | actively maintained — 55 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,382,716/month — #1,321 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rq-2.10.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
bullmqBullMQ for Python is a Redis-backed job queue…
permissive · top 5,000 on PyPI
django-rqDjango-RQ integrates RQ (Redis Queue) with…
permissive · top 5,000 on PyPI
faktoryA Python worker and client library for Faktory,…
permissive · top 15,000 on PyPI
hueyHuey is a lightweight task queue library that…
unclear · top 5,000 on PyPI
rq-dashboardA Flask-based web dashboard for monitoring RQ…
permissive · top 15,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
redis-simple-mqA lightweight message queue built on Redis that…
permissive · top 15,000 on PyPI
arqarq provides a job queue system for Python that…
permissive · top 5,000 on PyPI
dramatiqDramatiq is a distributed task processing…
copyleft · top 5,000 on PyPI