Official Python client for Hivehook, webhook infrastructure for modern teams (inbound and outbound).
Latest release: 0.1.1 on PyPI.
pip install hivehook-sdkFor the async client, install the optional extra:
pip install "hivehook-sdk[async]"import os
from hivehook import HivehookClient
client = HivehookClient(
base_url="http://localhost:8080",
api_key=os.environ["HIVEHOOK_API_KEY"],
)
source = client.sources.create(
name="Stripe production",
slug="stripe-prod",
provider_type="stripe",
verify_config={"secret": "whsec_..."},
)
print(f"created source {source.id}. POST webhooks to /ingest/{source.slug}")from hivehook import AsyncHivehookClient
async with AsyncHivehookClient(api_key="...") as client:
sources = await client.sources.list()from hivehook.webhook import verify
signature = request.headers["X-Hivehook-Signature"]
timestamp = int(request.headers["X-Hivehook-Timestamp"])
ok = verify(body, "your-signing-secret", signature, timestamp)See the full reference at hivehook.com/docs.
MIT. See LICENSE.