Skip to main content

Durable local queues for Python, with persistent retry state powered by Tenacity.

Project description

localqueue

Tests CodeQL PyPI version Coverage

localqueue is a small durable queue for one machine. It stores work on the local filesystem by default and keeps retry state with Tenacity.

Use it for scripts, CLI tools, cron jobs, and small Python workers that share one local store. Use localqueue.retry when another system already delivers work and you only need retry state that survives restarts.

localqueue queue exec emails -- python scripts/send_email.py
from localqueue import PersistentQueue, persistent_worker

queue = PersistentQueue("emails")
queue.put({"to": "user@example.com"})

@persistent_worker(queue)
def send_email(job: dict[str, str]) -> None:
    deliver(job["to"])

Full docs live at brunoportis.github.io/localqueue. The source docs are in docs/.

For development and release workflow details, see docs/develop.md.

Install

pip install localqueue

For the CLI:

pip install "localqueue[cli]"

For the optional LMDB backend:

pip install "localqueue[lmdb]"

Running with Docker

The image is also published on GitHub Container Registry:

docker pull ghcr.io/brunoportis/localqueue:latest
docker run --rm ghcr.io/brunoportis/localqueue:latest --help

When not to use

localqueue is not a distributed broker. If you need multi-host coordination, high write concurrency, managed retention, or strict cross-service ordering, use a system designed for that operating model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localqueue-0.4.0.tar.gz (130.0 kB view details)

Uploaded Source

Built Distribution

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

localqueue-0.4.0-py3-none-any.whl (49.4 kB view details)

Uploaded Python 3

File details

Details for the file localqueue-0.4.0.tar.gz.

File metadata

  • Download URL: localqueue-0.4.0.tar.gz
  • Upload date:
  • Size: 130.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for localqueue-0.4.0.tar.gz
Algorithm Hash digest
SHA256 969fd292df35ae720e462cf466c3a5c1c2803e8757af22f16563a0459877f324
MD5 454f67ea4c5677cc6d11bd6ab97c92c7
BLAKE2b-256 fb8e13572e583f4621172e6ddfa15add73a88067fcfcae9536c31e2c4f3e973e

See more details on using hashes here.

File details

Details for the file localqueue-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: localqueue-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 49.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for localqueue-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fafce375d25b1ead0833297cd88b02a857392d27538c8e3ec9f0a1e4d4fcf050
MD5 890e372a7f5b287b348510e233bc2bc8
BLAKE2b-256 7c3bd471af8ed07949c3a1a5048ae38861135c3eca993c766d6bd7650913ad09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page