A lightweight, resilient webhook sender and receiver.
Project description
LazyHooks
A lightweight, standalone Python package for sending and receiving webhooks with optional persistence.
Features
- Simple API: Send webhooks with minimal boilerplate.
- Async First: Built on
asyncioandaiohttpfor high performance. - Secure: Built-in HMAC-SHA256 signing and verification.
- Reliable: Optional
SQLitestorage to persist and retry failed webhooks.
Installation
pip install lazyhooks
Quick Start
Sending a Webhook (Fire & Forget)
import asyncio
from lazyhooks import WebhookSender
async def main():
sender = WebhookSender(signing_secret="super-secret")
await sender.send(
url="https://example.com/webhook",
payload={"event": "user.created", "id": 123}
)
asyncio.run(main())
Receiving a Webhook
from lazyhooks import verify_signature
# In your Flask/FastAPI/Django handler:
def handle_webhook(request):
signature = request.headers.get("X-Hub-Signature-256")
body = request.body
if verify_signature(body, signature, "super-secret"):
# Process webhook
return "OK", 200
else:
return "Invalid Signature", 401
Links
- GitHub: https://github.com/StackTactician/LazyHooks
- Issues: https://github.com/StackTactician/LazyHooks/issues
- Documentation: See the GitHub repo for full docs, advanced usage, and examples.
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
lazyhooks-0.1.3.tar.gz
(7.2 kB
view details)
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 lazyhooks-0.1.3.tar.gz.
File metadata
- Download URL: lazyhooks-0.1.3.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b38cbcc6449e4711755a831de147b6ba331434df2f5f6a89b6cde62465b224
|
|
| MD5 |
d92581c1f56ef83499f6f9c486277fcd
|
|
| BLAKE2b-256 |
c38e2584179c554b4ef1e2aa561b521577b3fe454b17125d4798fd4db99af7ce
|
File details
Details for the file lazyhooks-0.1.3-py3-none-any.whl.
File metadata
- Download URL: lazyhooks-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc93c9f15cc2655676697149dae2eda97fc7834dd8dd26222f02dfb472ccd745
|
|
| MD5 |
377f4c4002a590ee3851a5900257d85e
|
|
| BLAKE2b-256 |
85524970f429dbe50f6c8bd8ec6a5c33df7622498efb0592a6ebfa31bd765d1a
|