Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HookVerify Python SDK

Official Python SDK for the HookVerify webhook reliability API.

Installation

pip install hookverify

Quick Start

from hookverify import HookVerifyClient

client = HookVerifyClient(api_key="hv_your_api_key")

# List recent webhook deliveries
result = client.webhooks.list(limit=20)
for delivery in result.deliveries:
    print(f"{delivery.id}: {delivery.status}")

# Get a specific delivery
detail = client.webhooks.get("delivery-id-123")

# Replay a failed delivery
client.webhooks.replay("delivery-id-123")

Resources

Webhooks

# List deliveries with filters
result = client.webhooks.list(limit=50, status="failed", endpoint_id="ep_abc")

# Get delivery detail
delivery = client.webhooks.get("del_123")

# Replay a delivery
client.webhooks.replay("del_123")

Destinations

# List all destinations
dests = client.destinations.list()

# Create a destination
dest = client.destinations.create(
    url="https://example.com/webhooks",
    name="Production Server",
)

# Update a destination
dest = client.destinations.update("dest_123", name="Updated Name")

# Delete a destination
client.destinations.delete("dest_123")

Usage

usage = client.usage.get()
print(f"Received: {usage.webhooks_received}, Plan: {usage.plan}")

Dead Letter Queue

# List DLQ items
dlq = client.dlq.list(limit=50)
for item in dlq.items:
    print(f"{item.id}: {item.error_reason}")

# Retry a DLQ item
client.dlq.retry("dlq_item_123")

Error Handling

from hookverify import HookVerifyClient, NotFoundError, RateLimitError, AuthenticationError

client = HookVerifyClient(api_key="hv_your_api_key")

try:
    delivery = client.webhooks.get("nonexistent")
except NotFoundError:
    print("Delivery not found")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")
except AuthenticationError:
    print("Invalid API key")

Configuration

client = HookVerifyClient(
    api_key="hv_your_api_key",
    base_url="https://hookverify.com",  # default
    timeout=30.0,                        # seconds, default
    max_retries=3,                       # retries on 429/503, default
)

The client automatically retries on 429 Too Many Requests and 503 Service Unavailable with exponential backoff (respects Retry-After header when present).

Context Manager

with HookVerifyClient(api_key="hv_your_api_key") as client:
    result = client.webhooks.list()
    # Connection is automatically closed

About

Python SDK for the HookVerify webhook proxy API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages