Skip to main content

BullMQ For Python

This is the official BullMQ Python library. It is a close port of the NodeJS version of the library. Python Queues are interoperable with NodeJS Queues, as both libraries use the same .lua scripts that power all the functionality.

Features

Currently, the library does not support all the features available in the NodeJS version. The following have been ported so far:

Installation

pip install bullmq

Usage

Basic Example

from bullmq import Queue

queue = Queue('my-queue')

job = await queue.add('my-job', {'foo': 'bar'})

Job Priority

Prioritize jobs so higher priority jobs are processed first. Lower number = higher priority. 1 is the highest priority and 2_097_152 is the lowest. A priority of 0 (the default) means "no priority" and jobs are processed in FIFO order.

from bullmq import Queue

queue = Queue('my-queue')

# Higher priority job (will be processed first)
await queue.add('paint', {'color': 'red'}, {'priority': 1})

# Lower priority job
await queue.add('paint', {'color': 'blue'}, {'priority': 10})

Job Deduplication

Prevent duplicate jobs from being added to the queue:

from bullmq import Queue

queue = Queue('my-queue')

# Simple mode - deduplicates until job completes or fails
job = await queue.add('paint', {'color': 'white'}, {
    'deduplication': {
        'id': 'custom-dedup-id'
    }
})

# Throttle mode - deduplicates for a specific time window (in milliseconds)
job = await queue.add('paint', {'color': 'white'}, {
    'deduplication': {
        'id': 'custom-dedup-id',
        'ttl': 5000  # 5 seconds
    }
})

# Debounce mode - replaces pending job with latest data
job = await queue.add('paint', {'color': 'white'}, {
    'deduplication': {
        'id': 'custom-dedup-id',
        'ttl': 5000,
        'extend': True,  # Extend TTL on each duplicate attempt
        'replace': True  # Replace job data with latest
    },
    'delay': 5000  # Must be delayed for replace to work
})

Documentation

The documentation is available at https://docs.bullmq.io

License

MIT

Copyright (c) 2018-2023, Taskforce.sh Inc. and other contributors.

Metadata

Release files for bullmq 3.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bullmq 3.5.0
File Size Uploaded Provenance Actions
bullmq-3.5.0.tar.gz 926.1 kB Without provenance Details for bullmq-3.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bullmq 3.5.0
File Interpreter ABI Platform Actions
bullmq-3.5.0-py3-none-any.whl Python 3 none any Details for bullmq-3.5.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / bullmq-3.5.0.tar.gz

Download URL bullmq-3.5.0.tar.gz
Size 926.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d369a7c5fea05df456a0fcfd5970a2038b0b1f3f5dc84256582d125c8e9d37d1
BLAKE2b-256 checksum
How to use checksums
e9e454c8b172c63d34d47668b350af56ccf6cb61f51c86d64a38c8c2d25ebef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.15.0

Release files / bullmq-3.5.0-py3-none-any.whl

Download URL bullmq-3.5.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
03ef10f589c596bb9d1377f30b4823f560fea78fec2f1d97041f171dd37afea5
BLAKE2b-256 checksum
How to use checksums
7448b44a8caa9a16a438005eab7e6aaf8bcb50a265a6aa61bce0a82d1d290743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.15.0

Security for bullmq 3.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.5.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page