Skip to main content

full-event-hub (Python client)

Zero-dependency Python client for event-hub — a webhook fan-out service (ingest, fan-out to N subscribers, HMAC signing, retry/backoff, attempts, retention).

Only the standard library is used (urllib.request, json, hmac, hashlib). The package version matches the hub/image version (ghcr.io/ravileal/event-hub); because they move together, the client sends the English X-Idempotency header that hubs since 1.1.0 read, while a hub older than 1.1.0 ignores it.

Install

pip install full-event-hub

Publish an event

from event_hub import EventHubClient

hub = EventHubClient("http://127.0.0.1:18295")

hub.create_topic("orders", description="order lifecycle")
hub.create_subscriber("orders", "billing",
                      url="http://localhost:9000/hook", secret="s3cr3t",
                      max_attempts=3, backoff_ms=200)

resp = hub.publish_event("orders", {"order_id": 1}, idempotency_key="order-1")
print(resp.status, resp.body)  # 202 {'id': 1, 'deliveries_created': 1, 'duplicado': False}

publish_event sends the idempotency key as X-Idempotency (the header the hub reads since 1.1.0; it falls back to the legacy X-Idempotencia). Use sign(secret, raw_body) to sign the exact bytes you send.

Verify an incoming delivery

event-hub signs every delivery with HMAC-SHA256 of the raw body using the subscriber secret. Pass the exact bytes received; re-serializing JSON breaks the HMAC.

from event_hub import verify_delivery_signature

# in your webhook receiver:
valid = verify_delivery_signature(
    secret, raw_body, request.headers["X-Event-Hub-Signature"]
)

verify_delivery_signature returns False for a missing header, a wrong sha256= prefix, or a non-matching digest, and compares in constant time (hmac.compare_digest).

Notes

  • Idempotency header is X-Idempotency (English) since 1.1.0; the legacy X-Idempotencia is still accepted for old producers but new code should not send it.
  • Deliveries carry X-Event-Hub-Event, X-Event-Hub-Attempt and X-Event-Hub-Signature (sha256=<hex>).

MIT licensed.

Metadata

Release files for full-event-hub 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for full-event-hub 1.3.1
File Size Uploaded Provenance Actions
full_event_hub-1.3.1.tar.gz 8.5 kB With provenance Details for full_event_hub-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for full-event-hub 1.3.1
File Interpreter ABI Platform Actions
full_event_hub-1.3.1-py3-none-any.whl Python 3 none any Details for full_event_hub-1.3.1-py3-none-any.whl

Total release size: 15.9 kB

Release files / full_event_hub-1.3.1.tar.gz

Download URL full_event_hub-1.3.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bba43a5e26108e3ab667da149fcc5516db97a7d05fa02e6e2b8e177cfcd584f9
BLAKE2b-256 checksum
How to use checksums
8aebc85bf9de67db8578c15bd4c3169128a081d3f23e7a180752ad14592be1d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 25, 2026.

Transparency log

Release files / full_event_hub-1.3.1-py3-none-any.whl

Download URL full_event_hub-1.3.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0f4999d8dcfefc0c063c4c44c15c7cd840b505018e4f166fd2f69b4a8f27353
BLAKE2b-256 checksum
How to use checksums
1db3be7aedbb4b0947d413f9965a74a76cbb3229bdaf4c687ce8faa2009671ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 25, 2026.

Transparency log

Security for full-event-hub 1.3.1

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.

Select from 2 files

Attestation for full_event_hub-1.3.1.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 Oct 25, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page