Skip to main content

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.

Metadata

Release files for knockerlite 0.1.0

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

Source distribution (sdist)

Source distribution for knockerlite 0.1.0
File Size Uploaded Provenance Actions
knockerlite-0.1.0.tar.gz 28.5 kB Without provenance Details for knockerlite-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for knockerlite 0.1.0
File Interpreter ABI Platform Actions
knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 abi3 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details for knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 6.0 MB

Release files / knockerlite-0.1.0.tar.gz

Download URL knockerlite-0.1.0.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e3b19c18a0c1dcee2a451c8495efc6caafcf74b272e668ce43b55476fd9136b
BLAKE2b-256 checksum
How to use checksums
3798d91c4b41ec614884d67fe913a31033e7689208feeec498c19d24c7a29a02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL knockerlite-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
78ee1a702df9c65b137e974cff53bbee4a39404c14b545f788ec9360cb5d4335
BLAKE2b-256 checksum
How to use checksums
d414abbc37d6395e844c1be1372430970b91e158a550086d5dfc13ead813846f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL knockerlite-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f754ddf6239e5162dbc891d05586371afe555b91fe8c44b62f99ea57197faea7
BLAKE2b-256 checksum
How to use checksums
7156897daaebdf0faba9b37d9ebf2c08c13a49abec2b4ec477b4ef0dc03379b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL knockerlite-0.1.0-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.9 MB
Tags CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
29a3f56c157c1d0836b824c3d457558bad4a37d0f215c37588bc8d6f4e08dc3d
BLAKE2b-256 checksum
How to use checksums
cb8fabf4c18a75745a7c281d8d649d64f247f20568b51170a08eb7b1195b4015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for knockerlite 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

4 release files No provenance

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