A modern, type-hinted Python library for seamless interaction with the Discord Webhook API.
Project description
Clyde is a modern, type-hinted Python library for seamless interaction with the Discord Webhook API.
It's lightweight, developer-friendly, and supports advanced features like Components and Embeds.
Features
- Fully type-hinted for an excellent developer experience
- Input validation powered by Pydantic
- Support for all Webhook-compatible Components
- Granular customization of rich Embeds
- Helpers for Discord-flavored markdown, including timestamps
- Compatible with both synchronous and asynchronous HTTP requests
Getting Started
Installation
[!IMPORTANT] Clyde requires Python 3.13 or later.
Install with uv (recommended):
uv add discord-clyde
Alternatively, install with pip:
pip install discord-clyde
Examples
[!TIP] Take the examples below and copy/paste them into your project to get started in seconds.
Send a standard Message
from clyde import Webhook
relay: Webhook = Webhook(url="https://discord.com/api/webhooks/00000/XXXXXXXXXX")
relay.set_avatar_url("https://website.com/image_file.png")
relay.set_username("Heisenberg")
relay.set_content("[Clyde](https://github.com/EthanC/Clyde) says hi!")
relay.execute()
Send a Message with Components
from clyde import Webhook
from clyde.components import ActionRow, LinkButton, TextDisplay
relay: Webhook = Webhook(url="https://discord.com/api/webhooks/00000/XXXXXXXXXX")
relay.set_avatar_url("https://website.com/image_file.png")
relay.set_username("TARS")
greeting: TextDisplay = TextDisplay(content="[Clyde](https://github.com/EthanC/Clyde) says hi!")
actions: ActionRow = ActionRow()
repository: LinkButton = LinkButton()
repository.set_label("Try Clyde")
repository.set_url("https://github.com/EthanC/Clyde")
actions.add_component(repository)
relay.add_component(greeting)
relay.add_component(actions)
relay.execute()
Send a Message with an Embed
from clyde import Embed, Webhook
relay: Webhook = Webhook(url="https://discord.com/api/webhooks/00000/XXXXXXXXXX")
relay.set_avatar_url("https://website.com/image_file.png")
relay.set_username("Shady")
rich: Embed = Embed()
rich.set_description("[Clyde](https://github.com/EthanC/Clyde) says hi!")
rich.set_color("#5865F2")
relay.add_embed(rich)
relay.execute()
Releases
Clyde loosely follows Semantic Versioning for consistent, predictable releases.
Contributing
Contributions are welcome—whether it’s fixing bugs or adding new features.
- See
CONTRIBUTING.mdfor guidelines. - See Issues for known bugs and feature requests.
Acknowledgements
The Clyde character and Discord brand assets are owned by Discord. This project is not affiliated with or endorsed by Discord in any way.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discord_clyde-0.1.0.tar.gz.
File metadata
- Download URL: discord_clyde-0.1.0.tar.gz
- Upload date:
- Size: 7.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c7e6d187c65aa1788585f878b3c3eefeaa930ce25f8d407060603ea8b994bd
|
|
| MD5 |
342c87f018bb28ce3d705c6628e0a5e0
|
|
| BLAKE2b-256 |
86d12247fc38a054bdf2fb7744374f3a04243531574b6d33fa4143cf9d989391
|
File details
Details for the file discord_clyde-0.1.0-py3-none-any.whl.
File metadata
- Download URL: discord_clyde-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4a133d61c91701563a2d3852bf9b175566d1d8200453ee817b11326b3450fa2
|
|
| MD5 |
7387ebcb5f3be06dbf270e2a588c7228
|
|
| BLAKE2b-256 |
11d84a7a22186bbf0ffbdcd53835e5483419756d9f3de210d1ffcbee52ed1742
|