Skip to main content

Official Hivehook Python SDK

Project description

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.

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.1.tar.gz (33.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.1-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hivehook_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 33.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.1.tar.gz
Algorithm Hash digest
SHA256 c1d53a68764cdb81dd602cdaf0229dbbcdd1efb4206fe6f0be55983483a173a4
MD5 68575be59ab421b01f350ea167d67428
BLAKE2b-256 07c7b830ebdaff69b60c106947f633fb83812384fbf96089a3044b8e24621e44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hivehook_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 52.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c3b0a12af845b2fac50b94ba8fe578a90d8f7fbbe5f1d4349180948564d7f9e
MD5 fdbec2b025d725a7f7db3ffe9523d90b
BLAKE2b-256 7266bfdfa02ef3a70cf514d3f25a3c9a8aad990c133b491e664858feac2f68d1

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