Skip to main content
# disq

A [disque](https://github.com/antirez/disque) Python client.

[ ![Codeship Status for ryansb/disq](https://codeship.com/projects/d4928e10-d02e-0132-8d50-1a50b84b9184/status?branch=master)](https://codeship.com/projects/76941)

Under the hood, this used redis-py's HiRedis implementation and switches out
Redis commands with the disque ones.

## Usage

```
from disq import Disque

c = Disque() # connects to localhost:7711 by default
c.addjob('queuename', 'body') # takes all ADDJOB arguments
# b'DI... job id ...SQ'
c.getjob('queuename')
# [[b'queue', b'DI3971f14a850d9e5b3ca5c881e3dd1ba2a34277b505a0SQ', b'body']]
```

## Status

This library is ready to use with single or multi-node clusters. All commands
are implemented except for `QSTAT` and `SCAN`, which don't exist in the disque
server yet.

## Features

### Connection Balancing

As specified in the [disque README][clients], disq directs read and ack
operations (GETJOB, ACKJOB, FASTACK) to whichever member of the cluster it has
received the most jobs from in the last N seconds.

To change the length of the job count window, use the `job_origin_ttl_secs`
argument when creating the disque client.

## License

This code is released under the ASL2.0, see the `LICENSE` file for details.

## Thanks

Enormous thanks to Salvatore Sanfilippo (antirez) for writing
[disque](https://github.com/antirez/disque) and
[Andy McCurdy](https://github.com/andymccurdy), author of the
[redis-py](https://github.com/andymccurdy/redis-py) module.

[clients]: https://github.com/antirez/disque#client-libraries

Metadata

Release files for disq 0.0.4

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

Source distribution (sdist)

Source distribution for disq 0.0.4
File Size Uploaded Provenance
disq-0.0.4.tar.gz 17.1 kB Without provenance Details

Release files / disq-0.0.4.tar.gz

Download URL disq-0.0.4.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9507f49ecb11cb24cbe97c407151b410d06263bc36be8b741ae5cfab8fbfa5e5
BLAKE2b-256 checksum
How to use checksums
f32602e0139a12292f0a7a50ca18ba096355e9d415093d84e8bff5e70300b48c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for disq 0.0.4

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.

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