python-rq
Port variant v13
Summary Library for procesing background jobs (3.13)
Package version 2.8.0
Homepage https://python-rq.org/
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v14
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 23 APR 2026, 14:06:01 UTC
Port created 01 JAN 2023, 17:21:46 UTC
Subpackage Descriptions
single RQ (_Redis Queue_) is a simple Python library for queueing jobs and processing them in the background with workers. It is backed by Redis/Valkey and is designed to have a low barrier to entry while scaling incredibly well for large applications. It can be integrated into your web stack easily, making it suitable for projects of any size—from simple applications to high-volume enterprise systems. RQ requires Redis >= 5 or Valkey >= 7.2. [Build status] [PyPI] [Coverage] [![Code style: Ruff]](https://github.com/astral-sh/ruff) Full documentation can be found [here][d]. ## Support RQ If you find RQ useful, please consider supporting this project via [Tidelift]. ## Getting started First, run a Redis/Valkey server: ```console $ redis-server ``` To put jobs on queues, you don't have to do anything special, just define your typically lengthy or blocking function: ```python import requests def count_words_at_url(url): """Just an example function that's called async.""" resp = requests.get(url) return len(resp.text.split()) ``` Then, create an RQ queue: ```python from redis import Redis from rq import Queue queue = Queue(connection=Redis()) ``` And enqueue the function call: ```python from my_module import count_words_at_url job = queue.enqueue(count_words_at_url, 'https://stamps.id') ``` ## Job Prioritization By default, jobs are added to the end of a single queue. RQ offers two ways to give certain jobs higher priority: #### 1. Enqueue at the front You can enqueue a job at the front of its queue so it’s picked up before other jobs: ```python job = queue.enqueue(count_words_at_url, 'https://stamps.id', at_front=True) ``` #### 2. Use multiple queues You can create multiple queues and enqueue jobs into different queues based on their priority: ```python from rq import Queue high_priority_queue = Queue('high', connection=Redis()) low_priority_queue = Queue('low', connection=Redis()) # This job will be picked up before jobs in the low priority queue # even if it was enqueued later high_priority_queue.enqueue(urgent_task) low_priority_queue.enqueue(non_urgent_task) ``` Then start workers with a prioritized queue list: ```console $ rq worker high low ``` This command starts a worker that listens to both `high` and `low` queues. The worker will process jobs from the `high` queue first, followed by the `low` queue. You can also run different workers for different queues, allowing you to scale your workers based on the number of jobs in each queue.
Configuration Switches (platform-specific settings discarded)
PY313 ON Build using Python 3.13 PY314 OFF Build using Python 3.14
Package Dependencies by Type
Build (only) python313:dev:std
python-pip:single:v13
autoselect-python:single:std
Build and Runtime python313:primary:std
Runtime (only) python-click:single:v13
python-croniter:single:v13
python-redis:single:v13
Download groups
main mirror://PYPIWHL/3c/07/9a8c6ac2440f8e532260adaa3fe4a8f7edfcac4f038f3428e71cb32e13e2
Distribution File Information
49d87c8d0068b890e83052050ffd18be328339ae00c9c6d5dbf2702eb06107d2 119484 python-src/rq-2.8.0-py3-none-any.whl
Ports that require python-rq:v13
NetBox:std Flexible IPAM and DCIM tool with plugin support
python-django-rq:v13 Django integration of Redis Queue (3.13)
python-rq-scheduler:v13 Job scheduling capabilities to Redis Queue (3.13)