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

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bullmq-3.0.4.tar.gz (882.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bullmq-3.0.4-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file bullmq-3.0.4.tar.gz.

File metadata

  • Download URL: bullmq-3.0.4.tar.gz
  • Upload date:
  • Size: 882.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for bullmq-3.0.4.tar.gz
Algorithm Hash digest
SHA256 41e5e16530273f1875fbf3d0d1684cc52034a1c4bfd38030f0ff69914854710c
MD5 375153482a2a1b17f479d0c97efb57e4
BLAKE2b-256 4c6e79ef7bb1c4e051deddd4d33abb0af23f409992d6e320b16714c251328385

See more details on using hashes here.

File details

Details for the file bullmq-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: bullmq-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for bullmq-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4acccc72d1129da7fe6c0747733cb161178788a83430089342be493dd4427477
MD5 99b1715d9f8d891e8e64b478b650d32f
BLAKE2b-256 b53464fb224d999c31698cdb4251cc1e137309edfee6c120acc8a3bb88496758

See more details on using hashes here.

Release history Release notifications | RSS feed

3.2.0

2 files

3.1.1

2 files

3.1.0

2 files

3.0.6

2 files

3.0.5

2 files

This release

3.0.4 This release

2 files

3.0.3

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.26.0

2 files

2.25.4

2 files

2.25.3

2 files

2.25.2

2 files

2.25.1

2 files

2.25.0

2 files

2.24.0

2 files

2.23.1

2 files

2.23.0

2 files

2.22.0

2 files

2.21.1

2 files

2.21.0

2 files

2.20.4

2 files

2.20.3

2 files

2.20.2

2 files

2.20.1

2 files

2.20.0

2 files

2.19.8

2 files

2.19.7

2 files

2.19.6

2 files

2.19.5

2 files

2.19.4

2 files

2.19.3

2 files

2.19.2

2 files

2.19.1

2 files

2.19.0

2 files

2.18.3

2 files

2.18.2

2 files

2.18.1

2 files

2.18.0

2 files

2.17.0

2 files

2.16.2

2 files

2.16.1

2 files

2.16.0

2 files

2.15.1

2 files

2.15.0

2 files

2.14.0

2 files

2.13.1

2 files

2.13.0

2 files

2.12.1

1 file

2.12.0

1 file

2.11.0

1 file

2.10.1

1 file

2.10.0

1 file

2.9.4

1 file

2.9.3

1 file

2.9.2

1 file

2.9.1

1 file

2.9.0

1 file

2.8.1

1 file

2.8.0

1 file

2.7.8

1 file

2.7.7

1 file

2.7.6

1 file

2.7.5

1 file

2.7.4

1 file

2.7.3

1 file

2.7.2

1 file

2.7.1

1 file

2.3.3

1 file

2.3.2

1 file

2.3.1

1 file

2.3.0

1 file

2.2.4

1 file

2.2.3

1 file

2.2.2

1 file

2.2.1

1 file

2.2.0

1 file

2.1.0

1 file

2.0.0

1 file

1.24.0

1 file

1.23.0

1 file

1.22.0

1 file

1.21.0

1 file

1.20.0

1 file

1.19.0

1 file

1.18.0

1 file

1.17.0

1 file

1.16.1

1 file

1.16.0

1 file

1.15.4

1 file

1.15.3

1 file

1.15.2

1 file

1.15.1

1 file

1.15.0

1 file

1.14.0

1 file

1.13.2

1 file

1.13.1

1 file

1.13.0

1 file

1.12.0

1 file

1.11.0

1 file

1.10.1

1 file

1.10.0

1 file

1.9.0

1 file

1.8.0

1 file

1.7.0

1 file

1.6.1

1 file

1.6.0

1 file

1.5.0

1 file

1.4.0

1 file

1.3.1

1 file

1.3.0

1 file

1.2.0

1 file

1.1.0

1 file

1.0.0

1 file

0.5.6

1 file

0.5.5

1 file

0.5.4

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3.0

1 file

0.2.0

1 file

0.1.0

2 files

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