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

Uploaded Python 3

File details

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

File metadata

  • Download URL: bullmq-3.0.2.tar.gz
  • Upload date:
  • Size: 880.3 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.2.tar.gz
Algorithm Hash digest
SHA256 1df9fa2e1725e36e763c687faf97e4c01dfdad05095d66b7dbe802964dc671c4
MD5 5f544d5efe299cff77a48365eb395a5d
BLAKE2b-256 a7c9c569e97e4715b24775cf91a5997d4c3690aeb23ed7025ac8412f0c650602

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bullmq-3.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4380e56d1309a9e6920a8f90b7284c894d7383cd42e045a67743386a5ab10a5a
MD5 45f6a70c38638d5c595046f739d8520c
BLAKE2b-256 2151b7513c68c80b27edf697d90c7697956a2cef8521b7ee4715e9447c98fc97

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

This release

3.0.2 This release

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