discord-alert-transport

Portable Discord webhook transport — Python package + multi-language reference.

View the Project on GitHub jdp5949/discord-alert-transport

discord-alert-transport

Portable Discord webhook transport for every language and any application — Python package + 10-language reference + production patterns for severity routing, rate-limit backoff, audit history, and secret hygiene.

GitHub repo · PyPI-ready Python package · 10 language examples


The 30-second version

A Discord webhook is a public URL Discord generates per channel. POST JSON to it and a message appears. That’s it. Free, instant, no bot account, no OAuth, no SDK strictly required.

curl -X POST -H "Content-Type: application/json" \
  -d '{"content":"hello"}' \
  https://discord.com/api/webhooks/.../...

This repo ships:

  1. A Python package (discord_alert_transport) with batteries — severity routing, 429 backoff, audit-channel mirror, secret-safe logging.
  2. 10 language reference implementations — Python, JS, TS, Go, Rust, Bash, PHP, Ruby, Java, C# — so you can drop the same idiom into any stack.
  3. Production patterns — how to fan out alerts by severity, dedupe storms, ring a phone from silent mode, audit-trail every event.

Why bother

Without webhooks With webhooks
Build a custom dashboard Push to Discord, view on phone
Set up PagerDuty ($$$) Push to Discord + add ntfy for free wake-up
Email floods inbox Channels per severity, colour-coded
No history, no search Unlimited free history, server-wide search
Per-user 1:1 alerts Whole team sees same events instantly

Pages on this site


Install (Python)

pip install discord-alert-transport

Or from this repo:

pip install git+https://github.com/jdp5949/discord-alert-transport

Hello, world

from discord_alert_transport import Channel, DiscordSender, build_embed

s = DiscordSender(
    webhooks={Channel.ALERTS: "https://discord.com/api/webhooks/.../..."},
    enabled=True,
)
s.send_embed(
    Channel.ALERTS,
    build_embed(title="Hello", description="From discord-alert-transport", color=0x00cc66),
)

Phone buzzes.


Licence

MIT. See LICENSE.