← Back to all products

Webhook Framework

$29

Webhook delivery system with retry logic, signature verification, event sourcing, and monitoring dashboard.

📁 22 files
JSONMarkdownPythonRedisPostgreSQL

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 22 files

webhook-framework/ ├── LICENSE ├── README.md ├── examples/ │ ├── sample-events.json │ ├── send_webhook.py │ └── verify_signature.py ├── free-sample.zip ├── guide/ │ ├── event-sourcing.md │ ├── retry-and-idempotency.md │ └── signature-verification.md ├── guides/ │ ├── event-sourcing.md │ ├── retry-and-idempotency.md │ └── signature-verification.md ├── index.html ├── src/ │ ├── __init__.py │ ├── dashboard.py │ ├── delivery.py │ ├── event_store.py │ ├── receiver.py │ └── signatures.py ├── templates/ │ └── dashboard.html └── tests/ ├── test_delivery_retry.py └── test_signatures.py

📖 Documentation Preview README excerpt

Webhook Framework

A complete webhook delivery system with HMAC signature verification, exponential backoff retry, SQLite-backed event sourcing, and an HTML monitoring dashboard. Zero external dependencies -- Python 3.10+ standard library only.

Features

  • Webhook delivery engine with configurable retry logic (exponential backoff + full jitter)
  • HMAC-SHA256 signatures with timestamp binding to prevent replay attacks
  • Append-only event store on SQLite for full delivery audit trail
  • Webhook receiver with signature verification, idempotency checking, and event routing
  • Monitoring dashboard that renders delivery stats as an HTML page
  • Idempotency keys to prevent duplicate processing on retries
  • Dead letter tracking for permanently failed deliveries

Quick Start

1. Start the Webhook Receiver


cd webhook-framework
python -m src.receiver --port 9000 --secret whsec_demo_secret_key

2. Send a Webhook (in another terminal)


python examples/send_webhook.py

3. View the Dashboard


python -m src.dashboard --port 8080 --db webhook_events.db
# Open http://127.0.0.1:8080

4. Run the Signature Demo


python examples/verify_signature.py

5. Run Tests


python -m unittest discover tests/ -v

Architecture


Sender                          Receiver
  │                                │
  │  1. Sign payload (HMAC-SHA256) │
  │  2. POST with retry logic     │
  │  ─────────────────────────────>│
  │                                │  3. Verify signature
  │                                │  4. Check idempotency key
  │                                │  5. Process event
  │  <─────────────────────────────│  6. Return 200 OK

*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .py preview

examples/send_webhook.py""" Example: Send a signed webhook with retry logic. Usage: # Start the receiver first: python -m src.receiver --port 9000 --secret whsec_demo_secret_key # Then send a webhook: python examples/send_webhook.py """ from __future__ import annotations import sys, os sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) from src.delivery import deliver_webhook from src.signatures import generate_signing_secret def main() -> None: """Send example webhooks demonstrating different event types.""" # Use a shared secret (in production, store in env vars or secret manager) secret = "whsec_demo_secret_key" events = [ { "type": "order.created", "payload": { "order_id": "ord-20260617-001", "customer_email": "buyer@example.com", "total_amount": 149.99, "currency": "USD", "items": [ {"sku": "WIDGET-PRO", "name": "Pro Widget", "qty": 1, "price": 149.99} ], }, }, { "type": "payment.completed", "payload": { "payment_id": "pay-abc-123", "order_id": "ord-20260617-001",
Buy Now — $29 Back to Products