Python-first inbound webhook inbox on SQLite
Project description
knocker
Python bindings for Knocker, a Python-first inbound webhook inbox on SQLite.
Knocker stores every HTTP receipt before returning success, dedupes provider retries into durable Event rows, and runs handlers later in the same process using Honker, the SQLite-backed durable queue this project depends on.
Published package name: knockerlite. Python import name: knocker.
At a glance
pip install knockerlite
import knocker
app = knocker.open("app.db")
app.add_endpoint(
name="stripe",
path="/webhooks/stripe",
provider="stripe",
secrets=["whsec_123"],
)
@app.handle(endpoint="stripe", event_type="checkout.session.completed")
def handle_checkout(event, tx):
tx.query("INSERT INTO handled_events (event_id) VALUES (?)", [event.id])
result = app.receive(
endpoint="stripe",
body=raw_body_bytes,
headers=headers,
query=query_params,
)
Use receive(...) for normal verified ingress. Use ingest(...) only when a trusted layer already knows the verification outcome.
Knocker intentionally does not ship framework adapters. Host apps own routes, read the raw request body and headers, then call receive(...); the docs include copy-paste recipes for common frameworks.
What you can use it for
- Durable receipt storage before provider success
- Stripe and generic HMAC-SHA256 verification with active secret rotation
- Deduped event processing over append-only delivery rows
- Event-level retries, dead-lettering, replay, requeue, and explicit delivery replay
- Python operator reads for events and deliveries
- Explicit pruning for handled, ignored, and orphan-delivery rows
Handlers are synchronous and should stay short and DB-local. Slow outbound work belongs in app-owned follow-up jobs, and production apps should wrap run_worker(...) in their own restart/supervision harness.
See knocker.dev for guides and the repo-level README for development commands.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 knockerlite-0.1.0.tar.gz.
File metadata
- Download URL: knockerlite-0.1.0.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3b19c18a0c1dcee2a451c8495efc6caafcf74b272e668ce43b55476fd9136b
|
|
| MD5 |
4d33252430ae5ca4f066e10d4f954735
|
|
| BLAKE2b-256 |
3798d91c4b41ec614884d67fe913a31033e7689208feeec498c19d24c7a29a02
|
File details
Details for the file knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ee1a702df9c65b137e974cff53bbee4a39404c14b545f788ec9360cb5d4335
|
|
| MD5 |
cec43e21b0848b57348e52ecc6692151
|
|
| BLAKE2b-256 |
d414abbc37d6395e844c1be1372430970b91e158a550086d5dfc13ead813846f
|
File details
Details for the file knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f754ddf6239e5162dbc891d05586371afe555b91fe8c44b62f99ea57197faea7
|
|
| MD5 |
64893600f3c067853895bda8f4c4e83e
|
|
| BLAKE2b-256 |
7156897daaebdf0faba9b37d9ebf2c08c13a49abec2b4ec477b4ef0dc03379b2
|
File details
Details for the file knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.12+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a3f56c157c1d0836b824c3d457558bad4a37d0f215c37588bc8d6f4e08dc3d
|
|
| MD5 |
d513431d7a6f16613aae16e3875bd0ee
|
|
| BLAKE2b-256 |
cb8fabf4c18a75745a7c281d8d649d64f247f20568b51170a08eb7b1195b4015
|