Python client for the EntroQ task queue.
Reason this release was yanked:
Misleading license metadata
Project description
EntroQ (Python client)
Python client for EntroQ, a fault-tolerant,
competing-consumer task queue with exactly-once semantics and an atomic
Modify operation over tasks and a companion key/value doc store.
This package provides an async client and a small worker framework. It speaks to EntroQ two ways:
-
EntroQJSON— talks to a Go EntroQ server over its HTTP/Connect API. Use this when a server is already running (eqpg/eqmem/eqredis serve). -
EntroQ(inentroq.experimental.pg) — talks directly to PostgreSQL, no Go server in the path. It uses the same stored procedures the Goeqpgbackend does, and bundles the canonical schema so a pip-only environment can initialize a database without a Go toolchain. Requires thepgextra.Experimental. Anything under
entroq.experimentalhas no stability guarantee and may change or be removed in any release, including patches. The stable, supported path isEntroQJSONagainst a Go server. Pin an exact version if you depend on the direct client.
Install
pip install entroq # client + worker (JSON/HTTP)
pip install "entroq[pg]" # adds the direct-PostgreSQL backend (psycopg 3)
Quick start
A worker claims tasks from one or more queues and dispatches them to a handler:
import asyncio
from entroq import EntroQWorker, Modification
from entroq.json import EntroQJSON
eq = EntroQJSON("http://localhost:8080")
@EntroQWorker.handler
async def process(task, docs):
# ... do the work ...
return Modification(Modification.deleting(task)) # ack by deleting
asyncio.run(EntroQWorker(eq, "my-queue").run(process))
Talking straight to PostgreSQL instead of a server (experimental, see above):
from entroq.experimental.pg import EntroQ
eq = EntroQ("host=localhost dbname=entroq user=entroq password=secret")
A worker backed by the direct-PostgreSQL client also carries EntroQ's built-in,
always-on garbage collection for /gc=-marked queues on the backend's behalf; a
worker talking to a Go server does not, since the server collects for itself.
Documentation
See the main repository for the concepts
(tasks, claims, the atomic Modify, the doc store, and the /gc= naming
convention) and the server/backends the Go side provides.
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 entroq-0.12.1.tar.gz.
File metadata
- Download URL: entroq-0.12.1.tar.gz
- Upload date:
- Size: 41.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1c7f98d30c63b4f63f010c78646649369c68d9e3ec33185461d30cbea34769
|
|
| MD5 |
7578df35bd87027cf4a56fbe229d67e9
|
|
| BLAKE2b-256 |
ae2b8490b0ea15b59a4767f94caeda4cb3bd66bc6ff3712cead8cb92c909e282
|
File details
Details for the file entroq-0.12.1-py3-none-any.whl.
File metadata
- Download URL: entroq-0.12.1-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ea83f6dd81b0f4032ccaf784e9d0bf2e122532142d1c37d3fd49bd1a23463f
|
|
| MD5 |
7087e2fa41bc8b7f75816bcb308ca3c4
|
|
| BLAKE2b-256 |
a1a762271a992cdfaf8ec50a7ac8c56a73a88f0bb57a36c624326b28eb4111ad
|