skillfed

rq

RQ is a simple, lightweight, library for creating background jobs, and processing them.

rq v2.10.0 12.4M downloads/30d#1,321 on PyPI10,668
Permissive license BSD-2-Clause Active released

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 rq

uv

uv add rq

poetry

poetry add rq

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: InternetTopic :: Scientific/EngineeringTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Distributed ComputingTopic :: System :: MonitoringTopic :: System :: Systems Administration

Tags

background job queueredis job processingasync task schedulingdistributed job workercron job schedulingtask queue pythonjob retry and retry logic
job-queuebackground-tasksredis-backed

More Scientific/Engineering packages