alteriom-webhook-client
Python SDK for the Alteriom Webhook Connector. Provides HMAC-SHA256 signature verification, Pydantic models for delivery payloads, and a FastAPI integration helper.
Installation
pip install alteriom-webhook-client
# With FastAPI integration
pip install alteriom-webhook-client[fastapi]
Quick Start (FastAPI)
import os
from fastapi import Depends, FastAPI
from alteriom_webhook_client.fastapi import webhook_receiver
from alteriom_webhook_client.models import SubscriptionDelivery
app = FastAPI()
verify = webhook_receiver(secret=os.getenv("WEBHOOK_SECRET"))
@app.post("/webhook")
async def handle_webhook(delivery: SubscriptionDelivery = Depends(verify)):
if delivery.aggregate:
print(f"Got {delivery.aggregate.entity_type} for {delivery.aggregate.repository}")
return {"status": "accepted"}
Manual Usage
from alteriom_webhook_client import WebhookReceiver, WebhookVerificationError
receiver = WebhookReceiver(secret="your-secret")
# In any framework:
try:
delivery = receiver.receive(body=request_body_bytes, headers=request_headers_dict)
print(delivery.subscription_id)
print(delivery.aggregate.summary)
except WebhookVerificationError as e:
print(f"Verification failed: {e.message} (HTTP {e.status_code})")
Low-Level Signature Functions
from alteriom_webhook_client import verify_signature, sign_payload
# Verify a signature
is_valid = verify_signature(
body=raw_bytes,
signature=headers["x-connector-signature-256"],
timestamp=headers["x-connector-timestamp"],
secret="your-secret",
)
# Generate a signature (for testing)
sig = sign_payload(body=raw_bytes, timestamp="1711700000000", secret="your-secret")
Configuration
receiver = WebhookReceiver(
secret="your-secret",
max_age_ms=300_000, # Reject timestamps older than 5 minutes (default)
max_payload_bytes=10_485_760, # Reject payloads larger than 10 MB (default)
)
Models
SubscriptionDelivery— top-level delivery payloadAggregate— event aggregate (PR lifecycle, issue, workflow, etc.)Enrichment— AI enrichment dataWebhookEvent— individual webhook event
License
MIT
Metadata
Release files for alteriom-webhook-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| alteriom_webhook_client-0.1.0.tar.gz | 6.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alteriom_webhook_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / alteriom_webhook_client-0.1.0.tar.gz
| Download URL | alteriom_webhook_client-0.1.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07a88adae6695bf28cd3c25a7d7a5cd15cfa2a2e508066de06bbe4ba04453dce
|
|
BLAKE2b-256 checksum How to use checksums |
f987300f5b419b29a2de7c696b99bb60b269972e94910f33b297196d3a6be93f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logRelease files / alteriom_webhook_client-0.1.0-py3-none-any.whl
| Download URL | alteriom_webhook_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98ecd14fc022fc4ac35fb71f3c772fb4c858eabe9a52330ba767f1ddb70ca0fd
|
|
BLAKE2b-256 checksum How to use checksums |
4ad74a5e9d8edc475ba49e45bb63a5bf608c0e9fb93760a9096804704f79e983
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logSecurity for alteriom-webhook-client 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for alteriom_webhook_client-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.