Skip to main content

Official Hivehook Python SDK

Project description

hivehook (Python)

Official Python client for Hivehook, the self-hostable webhook gateway (inbound + outbound).

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hivehook_sdk-0.1.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hivehook_sdk-0.1.0-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file hivehook_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: hivehook_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for hivehook_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b67fe1cceac1a8c4f4317f136fb3e7ce1a2f8aac398873d547f2bb4b2452d88
MD5 02eba699c6b00d62101d869420afc1fe
BLAKE2b-256 c4fe1174d8f7a964b8984c08dc797b8435a11486c2f7ab8cec80f5925ffe244c

See more details on using hashes here.

File details

Details for the file hivehook_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hivehook_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for hivehook_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f562da8aa5aeb76eddd8c46537c7c66513450fa8c0065b1a8e3ca9eacaf66657
MD5 480d51fea5c4e891acac9df877305597
BLAKE2b-256 b807f6b74344805eb85d0a13a317d7bf2bcf731d91896013056cb6b88e18dec4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page