Build rich Discord Webhook API interactions with a typed Python API.
Clyde supports plain messages, Components, and rich Embeds for the Discord Webhook API. It validates each payload and sends it through synchronous or asynchronous HTTP methods.
- Type annotations across the public API
- Input type and field validation with msgspec
- Plain content, every webhook-compatible Discord Component, and field-level Embed controls
- Helpers for Discord-flavored Markdown and timestamps
- Synchronous and asynchronous HTTP requests through niquests
- Automatic retries when Discord returns a rate limit
- API documentation generated with Zensical
Important
Clyde requires Python 3.11 or later.
Add Clyde to a uv project:
uv add discord-clydefrom clyde import Webhook
Webhook(
url="https://discord.com/api/webhooks/00000/XXXXXXXXXX",
avatar_url="https://i.imgur.com/RzkhQgZ.png",
username="Heisenberg",
content="[Clyde](https://github.com/EthanC/Clyde) says hi!",
).execute()from clyde import Webhook
from clyde.components import ActionRow, LinkButton, TextDisplay
webhook = Webhook(
url="https://discord.com/api/webhooks/00000/XXXXXXXXXX",
avatar_url="https://i.imgur.com/BpcKmVO.png",
username="TARS",
)
webhook.add_component(
[
TextDisplay(content="[Clyde](https://github.com/EthanC/Clyde) says hi!"),
ActionRow(
components=[
LinkButton(
label="Try Clyde",
url="https://github.com/EthanC/Clyde",
)
]
),
]
).execute()from clyde import Embed, Webhook
Webhook(
url="https://discord.com/api/webhooks/00000/XXXXXXXXXX",
avatar_url="https://i.imgur.com/QaTHttz.png",
username="Shady",
embeds=[
Embed(
description="[Clyde](https://github.com/EthanC/Clyde) says hi!",
color="#5865F2",
)
],
).execute()Clyde loosely follows Semantic Versioning.
Bug fixes and new features are welcome. Read the contribution guide before opening a pull request. Known bugs and feature requests are tracked in GitHub Issues.
Discord owns the Clyde character and Discord brand assets. This project is not affiliated with or endorsed by Discord.



