Durable local queues for Python, with persistent retry state powered by Tenacity.
Project description
localqueue
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 when the work can stay local and you want one of these outcomes:
- accept work now and perform the side effect later on the same machine
- inspect failed jobs and replay them from the terminal
- keep retry budgets across process restarts without adding a broker
It fits scripts, CLI tools, cron jobs, and small Python workers that share one local store.
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/.
Start with docs/use-cases.md if you want the shortest
path to deciding whether the project fits your workflow.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file localqueue-0.4.1.tar.gz.
File metadata
- Download URL: localqueue-0.4.1.tar.gz
- Upload date:
- Size: 131.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce13bfb99811ee72b85789660db977f2faa3832cb40a6c1229d6a23f34e51b61
|
|
| MD5 |
91d8dc2a3b785624a3bcc63cd0ec335d
|
|
| BLAKE2b-256 |
001a2974583adeb0b5b5dbd58117316bb623e1b914f72f905e5100ccc8c3e30d
|
File details
Details for the file localqueue-0.4.1-py3-none-any.whl.
File metadata
- Download URL: localqueue-0.4.1-py3-none-any.whl
- Upload date:
- Size: 49.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb036da8a50d3c3a38dcfdb4ecebb5814710215b93e8e4937566f1b8afa7b8e
|
|
| MD5 |
843468bf7aa7e8e6c20502f08803117d
|
|
| BLAKE2b-256 |
7c5294979955a0a639ab282f14c3cb809aaf024ad3c34b5347c6c5dfbd30eee9
|