Official Python SDK for NimbusNexus Webhooks — publish events + verify webhook signatures.
Project description
webhookd-sdk (Python)
Official Python SDK for NimbusNexus Webhooks — publish events, and verify the webhooks you receive.
pip install webhookd-sdk
Verify an incoming webhook (subscribers)
When webhookd delivers a webhook it signs the body with your endpoint's signing secret. Always verify the signature before trusting the payload — it proves the request really came from webhookd and wasn't tampered with or replayed.
from webhookd_sdk import verify
# In your webhook handler — pass the RAW request body bytes (do not re-serialize the JSON):
ok = verify(
secret=ENDPOINT_SIGNING_SECRET,
raw_body=request.body,
signature=request.headers["X-Webhook-Signature"],
timestamp=request.headers["X-Webhook-Timestamp"],
)
if not ok:
return Response(status_code=400) # forged, tampered, or outside the 300s replay window
Publish an event (producers)
from webhookd_sdk import Client, WebhookdAPIError
with Client("https://webhooks.example.com", api_key="whsk_…") as wh:
try:
event = wh.publish(
"order.created",
{"order_id": "ord_123", "total": 4200},
idempotency_key="order-123", # makes the publish safe to retry
)
print(event.event_uid, event.deliveries_created)
except WebhookdAPIError as e:
print(e.status_code, e.code, e.message) # the stable {error:{code,message}} envelope
Transient failures (connection errors, 429, 5xx) are retried with backoff (a 429 honours
Retry-After); other 4xx raise WebhookdAPIError.
Develop
pip install -e '.[dev]'
pytest && ruff check . && mypy webhookd_sdk
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 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 webhookd_sdk-0.1.0.tar.gz.
File metadata
- Download URL: webhookd_sdk-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acaf314483396353a083655a87f12d53a7df90e8b09bf76771039986aad579c2
|
|
| MD5 |
b79eb5699c1edbe12c2eb1ff10e5259f
|
|
| BLAKE2b-256 |
d9c1009d40efee0e69ca25a8e64865ccc8b0246ab88686dc71f4f3326c7a70ae
|
Provenance
The following attestation bundles were made for webhookd_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on NimbusNexus/Webhooks-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webhookd_sdk-0.1.0.tar.gz -
Subject digest:
acaf314483396353a083655a87f12d53a7df90e8b09bf76771039986aad579c2 - Sigstore transparency entry: 1996359869
- Sigstore integration time:
-
Permalink:
NimbusNexus/Webhooks-sdks@d2d5b0732860386b027c9f575f83dd28e30b476b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NimbusNexus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2d5b0732860386b027c9f575f83dd28e30b476b -
Trigger Event:
push
-
Statement type:
File details
Details for the file webhookd_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: webhookd_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43a402ecc650a1891017a71f0f0117b19d6ef06fc84d33075ffd15aefc9d6ce1
|
|
| MD5 |
0c896f59c5cf60ce2f71305795dc13ba
|
|
| BLAKE2b-256 |
ca978cccb1a5493a816f2ec21faebd3d08834c07ad87eebce4238ea24472abf9
|
Provenance
The following attestation bundles were made for webhookd_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on NimbusNexus/Webhooks-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
webhookd_sdk-0.1.0-py3-none-any.whl -
Subject digest:
43a402ecc650a1891017a71f0f0117b19d6ef06fc84d33075ffd15aefc9d6ce1 - Sigstore transparency entry: 1996359942
- Sigstore integration time:
-
Permalink:
NimbusNexus/Webhooks-sdks@d2d5b0732860386b027c9f575f83dd28e30b476b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NimbusNexus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2d5b0732860386b027c9f575f83dd28e30b476b -
Trigger Event:
push
-
Statement type: