Skip to main content

simplehook / simplehook-flask

One line of code. Webhooks just work.

Stop tunneling. Stop polling. Stop building webhook infrastructure. Add one SDK call and your local app receives real webhooks from Stripe, GitHub, Twilio — any provider.

listenToWebhooks(app, os.environ["SIMPLEHOOK_KEY"])

Your app opens an outbound WebSocket to simplehook.dev. When a webhook arrives at your stable URL, it's forwarded through the connection to your local server. Your response goes back to the caller. No CLI. No tunnel process. No URL that changes every session.

Why simplehook?

  • No CLI — just pip install and one function call
  • Permanent URLs — set once in Stripe/GitHub, never change them
  • Real responses — passthrough mode returns your actual response to the caller (TwiML, verification, etc.)
  • Queue + retry — if your app is offline, events queue and deliver when you reconnect
  • Dev mode by default — only connects in development, never in production

Install

pip install simplehook-flask

Quick start

from flask import Flask, request, jsonify
from simplehook_flask import listenToWebhooks

app = Flask(__name__)

listenToWebhooks(app, os.environ["SIMPLEHOOK_KEY"])

@app.post("/stripe/events")
def stripe_webhook():
    print("Webhook received!", request.json)
    return jsonify(received=True)

Options

listenToWebhooks(app, api_key, {
    "force_enable": False,     # Connect even in production
    "server_url": "...",       # Override server URL
    "on_connect": callback,    # Called when connected
    "on_disconnect": callback, # Called when disconnected
    "silent": False,           # Suppress console output
})

Dev mode

By default, simplehook only connects in development. Set SIMPLEHOOK_ENABLED=false to disable, or force_enable: True to force.

Production is detected when FLASK_ENV === "production" or FLASK_DEBUG is not set.

Links

License

MIT

Metadata

Release files for simplehook-flask 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplehook-flask 0.3.1
File Size Uploaded
simplehook_flask-0.3.1.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simplehook-flask 0.3.1
File Interpreter ABI Platform
simplehook_flask-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / simplehook_flask-0.3.1.tar.gz

Download URL simplehook_flask-0.3.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
344703deb44133c4fc2b140b502f33275f9ab34d6edbb4ef9d2028773b12c3ad
BLAKE2b-256 checksum
How to use checksums
e159425740cffb3ccc346fe5ca98319f924b1ad918d110912348ea9cf8698ba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / simplehook_flask-0.3.1-py3-none-any.whl

Download URL simplehook_flask-0.3.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a28c9d2baebbbfb571dcd1142708a7225d79f445c5f728f4f38dbb6e6fae3600
BLAKE2b-256 checksum
How to use checksums
a13afc7148f16ed4357ab5e2c50989fe79fb8658a6c9a1ce898e97174f1c3a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page