Skip to main content

omniwebhook

Webhooks firmados que se emiten y se reciben igual en cualquier stack: verificación, frescura, idempotencia y reintentos con las mismas reglas en Python y en TypeScript.

  • Recibir: verifica la firma, rechaza lo viejo y lo ambiguo, y procesa cada evento una sola vez. Devuelve un resultado tipado en vez de lanzar.
  • Emitir: firma con Standard Webhooks, no entrega a direcciones internas y dice cuándo reintentar.
  • Sincrónico y asincrónico, con tipos completos y sin dependencias obligatorias. Python 3.11 o superior.
pip install omniwebhook

Recibir

import json
import os

from omniwebhook import VerifiedEvent, create_async_receiver, stripe_scheme
from omniwebhook.postgres import AsyncPostgresIdempotencyStore, AsyncPsycopgClient
from omniwebhook.starlette import to_incoming_request, to_response

receive = create_async_receiver(
    verifier=stripe_scheme(secrets=[os.environ.get("STRIPE_WEBHOOK_SECRET", "")]),
    store=AsyncPostgresIdempotencyStore(AsyncPsycopgClient(pool.connection)),
)


@app.post("/webhooks/stripe")
async def stripe_webhook(request: Request) -> Response:
    async def procesar(event: VerifiedEvent) -> None:
        await registrar_pago(json.loads(event.request.body))

    return to_response(await receive.execute(await to_incoming_request(request), procesar))

Esquemas incluidos: stripe_scheme, mercadopago_scheme, github_scheme, creem_scheme, hmac_body_scheme y, en omniwebhook.standard, standard_scheme.

Emitir

import os

from omniwebhook import Delivery, Endpoint, MemoryDeliveryLedger, create_sender, random_message_id
from omniwebhook.standard import standard_signer

send = create_sender(
    signer=standard_signer(secrets=[os.environ.get("WEBHOOK_SIGNING_SECRET", "")]),
    ledger=MemoryDeliveryLedger(),
)

attempt = send.execute(
    Delivery(
        endpoint=Endpoint(id="ep_42", url="https://cliente.example/webhooks"),
        message_id=random_message_id(),
        payload=b'{"type":"pedido.creado"}',
    )
)

Módulos y extras

Módulo Qué trae Extra
omniwebhook Recepción, emisión, esquemas, almacén en memoria y transporte de la biblioteca estándar Ninguno
omniwebhook.standard El formato Standard Webhooks: verificar y firmar omniwebhook[standard]
omniwebhook.postgres El almacén de reservas sobre PostgreSQL omniwebhook[postgres], para el pool de psycopg
omniwebhook.firestore El almacén de reservas sobre Firestore omniwebhook[firestore]
omniwebhook.starlette Ayudas para Starlette y FastAPI omniwebhook[starlette]
omniwebhook.httpx Un transporte asincrónico sobre httpx omniwebhook[httpx]

omniwebhook.standard usa por defecto la librería de referencia del formato. Con signer=native_signer firma con la biblioteca estándar y no hace falta el extra:

from omniwebhook.standard import native_signer, standard_scheme

standard_scheme(secrets=[secreto], signer=native_signer)

Documentación

Licencia

MIT

Metadata

Release files for omniwebhook 0.2.0

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

Source distribution (sdist)

Source distribution for omniwebhook 0.2.0
File Size Uploaded Provenance Actions
omniwebhook-0.2.0.tar.gz 164.8 kB With provenance Details for omniwebhook-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omniwebhook 0.2.0
File Interpreter ABI Platform Actions
omniwebhook-0.2.0-py3-none-any.whl Python 3 none any Details for omniwebhook-0.2.0-py3-none-any.whl

Total release size: 224.0 kB

Release files / omniwebhook-0.2.0.tar.gz

Download URL omniwebhook-0.2.0.tar.gz
Size 164.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d3148bf582e23cbf5572148948f656425c36309645f7f1c02ef78dbce9311217
BLAKE2b-256 checksum
How to use checksums
b0c1c2d0728ee7cf62202321fe1c86dd3970818fd9618380f7620ecf6103da64
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 Nov 23, 2026.

Transparency log

Release files / omniwebhook-0.2.0-py3-none-any.whl

Download URL omniwebhook-0.2.0-py3-none-any.whl
Size 59.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67e2d0f2f480102178dd1864432b0c97b88ab6d8c8b40c23db04d84c11a738ef
BLAKE2b-256 checksum
How to use checksums
226550373faad9c50447632d1e7bcd854035b5dc889df2f46f6287354dc666f3
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 Nov 23, 2026.

Transparency log

Security for omniwebhook 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for omniwebhook-0.2.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 Nov 23, 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