Skip to main content

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

Project description

localqueue

Tests CodeQL 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/.

Install

pip install localqueue

For the CLI:

pip install "localqueue[cli]"

For the optional LMDB backend:

pip install "localqueue[lmdb]"

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.3.1.tar.gz (110.4 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.3.1-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: localqueue-0.3.1.tar.gz
  • Upload date:
  • Size: 110.4 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.3.1.tar.gz
Algorithm Hash digest
SHA256 656d13c440a65bc5ea6ad161d68ad8f15eafd3663fd4f37275a5c05c37cfd025
MD5 2368a5e8e16832cc74140b639a70c2c5
BLAKE2b-256 5bf3cc344456f130b751496ad76b8b08dc420d7f6346c030a403a2ebfd4a9f45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: localqueue-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 35.6 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a36f2c06f96a2b3c462bc95403413d242d6ef7ace5d09fae5b8ede7b5480eff7
MD5 50c6f98977571822f0227a11f31561b9
BLAKE2b-256 de77170558e6708ed3ed907690d29695940920c14bb31c0330f7bc734a9bc10e

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