Skip to content

hivehook/sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hivehook (Python)

Official Python client for Hivehook, webhook infrastructure for modern teams (inbound and outbound).

Latest release: 0.1.1 on PyPI.

Install

pip install hivehook-sdk

For the async client, install the optional extra:

pip install "hivehook-sdk[async]"

Quick start

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}")

Async usage

from hivehook import AsyncHivehookClient

async with AsyncHivehookClient(api_key="...") as client:
    sources = await client.sources.list()

Webhook signature verification

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)

Documentation

See the full reference at hivehook.com/docs.

License

MIT. See LICENSE.

About

Official Python client for Hivehook, webhook infrastructure for modern teams.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages