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.5.tar.gz (883.4 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.5-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bullmq-3.0.5.tar.gz
Algorithm Hash digest
SHA256 0e8c76e04c124e5eadf5fb609f1a897e7ad904a2b83be7dfecee8dfa1e8b9868
MD5 732fa1718af8bad3ec1f4b04a9384dfd
BLAKE2b-256 1b4fbae828b9622ec522252e60f75d2e7c9e31c972b40a86db80b39447ae1b80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bullmq-3.0.5-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.7

File hashes

Hashes for bullmq-3.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 033d672df35ff7885b64f8353188e41d08a264a441156aecaa8dc546f4854558
MD5 ee80beb4d043db326b7ed793413d4beb
BLAKE2b-256 4e40291c48eafcf9062da67ada6819b2b53906f6983e6a37dfec51a18000c5cd

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

This release

3.0.5 This release

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

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