Skip to main content

redque

A distributed queue based on Redis

Installation

pip install redque

Example

import time
import random
import threading
import redis
import redque


def productor(redis_conn):
    other_queue = redque.Queue(redis_conn, "__test", "bp__test")

    for _ in range(100):
        other_queue.push("e_{0}".format(random.randint(1, 100)))
        time.sleep(0.1)


if __name__ == "__main__":
    pool = redis.ConnectionPool(
        host="127.0.0.1",
        port=6379,
        password="123456"
    )

    queue = redque.Queue(
        redis.Redis(connection_pool=pool),
        "__test",
        "bp__test"
    )
    queue.clear(True)

    # non-blocking
    for _ in range(100):
        queue.push(random.randint(1, 100))

    queue.process(lambda x: (print(x), True), False)

    # blocking
    t = threading.Thread(target=productor,
                        args=(redis.Redis(connection_pool=pool),))
    t.start()

    queue.process(lambda x: (print(x), True), timeout=3)

    t.join()

Metadata

Release files for redque 0.1.0

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

Source distribution (sdist)

Source distribution for redque 0.1.0
File Size Uploaded Provenance Actions
redque-0.1.0.tar.gz 2.6 kB Without provenance Details for redque-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for redque 0.1.0
File Interpreter ABI Platform Actions
redque-0.1.0-py3-none-any.whl Python 3 none any Details for redque-0.1.0-py3-none-any.whl

Total release size: 9.2 kB

Release files / redque-0.1.0.tar.gz

Download URL redque-0.1.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e2dac63d8453b6d5f49aa7ec3a085e6a8356ae63d05bdcbe41fbfc3276fdb16
BLAKE2b-256 checksum
How to use checksums
274c3259e7da7395d765cda5cc50dcb9718dacf7b575ca9526d9362bf8145af2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

Release files / redque-0.1.0-py3-none-any.whl

Download URL redque-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9398b35dab574b2300a756503f9db8418ef250ef54e9ca4940dd9439125464d3
BLAKE2b-256 checksum
How to use checksums
8d9b6162fd0fb3934c2a008d1ef58ec9e4461f03e3d1d986801e1e63591a5281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

Security for redque 0.1.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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