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-2.26.0.tar.gz (819.0 kB view details)

Uploaded Source

Built Distribution

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

bullmq-2.26.0-py3-none-any.whl (938.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bullmq-2.26.0.tar.gz
Algorithm Hash digest
SHA256 cc7727c531c7a5a267e69ed42ab7c9159b6a9e415f41c2327b923e022844a5f1
MD5 f0f70dec091c4f4029ebe2c3785103b1
BLAKE2b-256 7cd143294a680c5107ef2362ac473744e60a07fb8276edd0033f400bca21fc58

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bullmq-2.26.0-py3-none-any.whl
  • Upload date:
  • Size: 938.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for bullmq-2.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9432eaee74fcf19a45242ca6e553927d72aaa7a00171c74559c265cd088ce9b
MD5 51b6dff480e6447805c07a971a574433
BLAKE2b-256 9da7ab6616cee06ea48b9e93ca6708429f9004d3d349fa9befc97aadd3e142f4

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

3.0.4

2 files

3.0.3

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

This release

2.26.0 This release

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