Skip to content

LeanMQ

Replace your internal webhooks with a reliable, performant, and scalable MQ with a fantastic DX.

sh
pip install leanmq
py
# from leanmq import LeanMQWebhook
webhook = LeanMQWebhook()

Sending a webhook is easy

py
# Looks very similar to a POST request
webhook.send("/order/status/", {"id": "123", "status": "shipped"})

So is receiving them

py
# Looks just like Flask, FastAPI, etc.
@webhook.get("/order/status/")
def process_order_status(data):
    print(f"Order: {data['id']}, status: {data['status']}")

# Process in a dedicated worker (or scale to 1000s)
webhook.run_service()

# Don't need dedicated workers? Schedule this in a CRON instead.
webhook.process_messages()

… and get all of these for free

Freedom from retry handling and rate limiting • Failed webhooks automatically go to a dead letter queueSet a TTL to automatically expire old webhooks • Persisted data so no more dropped webhooks • Atomic transactions for when you need them