Skip to main content

Python client SDK for FlowQueue — a cloud-native message processing platform

Project description

flowqueue

Python client SDK for FlowQueue — a cloud-native message processing platform (durable queues, per-consumer delivery lifecycle, retries, dead-letter queue, scheduled delivery, webhooks with HMAC signing, replay, and a tamper-evident audit log).

pip install flowqueue

Quickstart

from flowqueue import FlowQueueClient, FlowQueueConsumer

client = FlowQueueClient("https://flowqueue.example.com", "fq_your_api_key")

# Create a queue + a pull consumer
queue = client.create_queue("orders", max_retries=5, dlq_enabled=True)
consumer = client.create_consumer(queue["id"], "billing", type="http")

# Publish (optionally scheduled)
client.publish(queue["id"], {"order_id": 42}, idempotency_key="order-42")
client.publish(queue["id"], {"order_id": 43}, delay_seconds=30)   # deliver in 30s

# Consume one delivery
c = FlowQueueConsumer(client, consumer["id"])
d = c.poll()
if d:
    print(d.payload)
    c.complete(d.id, remark="done")

Run a worker loop

def handle(delivery):
    process(delivery.payload)        # raise to fail (retry / DLQ), return to complete

FlowQueueConsumer(client, consumer_id).run(handle, poll_interval=2.0)

Management, replay, DLQ

client.pause_queue(qid); client.resume_queue(qid)
client.queue_stats(qid)
client.replay_failed(consumer_id)
dead = client.dlq_list(qid)
client.requeue_all(qid)              # bulk requeue the dead-letter queue

API keys & scopes

Generate scoped keys in the FlowQueue UI or:

key = client.create_api_key("ci-publisher", scopes=["publish"])
print(key["token"])   # shown once

Errors raise flowqueue.ApiError(status, code, message).

License

MIT

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

flowqueue-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

flowqueue-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file flowqueue-0.1.0.tar.gz.

File metadata

  • Download URL: flowqueue-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowqueue-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef28a39ac11ae0f6d2579addd8886d547cbf477b1ecea704e83bc1b3f500fd14
MD5 58d04cbe831ffb4112ef526ab4e6b723
BLAKE2b-256 17f8e2beb91bf1092fee3cd83fcb8f09c5d985ff6f27b5bb4ae86ec8949258c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowqueue-0.1.0.tar.gz:

Publisher: publish.yml on Skill-College/flowqueue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowqueue-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flowqueue-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowqueue-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33f94d0a67c6a17d721702ec6d6e5bf73d20a74808ea833a8264b69099b60934
MD5 065a99bfd5fdb5c349f58cf46939d687
BLAKE2b-256 14695ef437f48ba11eca59658f5c8700cafb39d25afee3cc9b83b96e49aea435

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowqueue-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Skill-College/flowqueue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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