A Python library for converting Discord emoji names to their Unicode equivalents.
Project description
Dismoji is a lightweight Python library that provides a simple way to convert Discord
emoji names to their Unicode equivalents and vice versa. With just two function calls,
you can transform text containing Discord-style emoji codes (like :smile:) into text
with actual Unicode emoji characters (like "😄") and back again.
This library uses Paillat-dev/discord-emojis as the source for Discord emoji names and aliases.
import dismoji
# Convert Discord emoji names to Unicode emojis
text = "Hello, :wave: I'm excited! :partying_face:"
converted_text = dismoji.emojize(text)
print(converted_text) # Output: "Hello, 👋 I'm excited! 🥳"
# Convert Unicode emojis back to Discord emoji names
emoji_text = "Hello, 👋 I'm excited! 🥳"
named_text = dismoji.demojize(emoji_text)
print(named_text) # Output: "Hello, :wave: I'm excited! :partying_face:"
Features
- Simple API: Just two functions to remember -
dismoji.emojize()anddismoji.demojize() - Discord Compatible: Supports Discord's emoji naming conventions
- Comprehensive: Includes all standard emojis available on Discord
- Type Safe: Fully type-annotated for better IDE integration
- Zero Dependencies: Lightweight with no external dependencies
- Fast: Optimized for quick emoji replacement
- Bidirectional: Convert between emoji names and characters in both directions
Getting Help
If you encounter issues or have questions about dismoji:
- GitHub Issues: Submit a bug report or feature request
- Discord Support: Join the Pycord Official Server and
mention
@paillat
Development
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run linter, formatter and type checker:
ruff check .,ruff format .,basedpyright . - Submit a pull request
Development Tools:
- uv: For dependency management
- Ruff: For linting and formatting
- HashiCorp Copywrite: For managing license headers
- basedpyright: For type checking
Acknowledgements
emojias inspiration for the API design
License
MIT License - Copyright (c) 2025 Paillat-dev
Made with ❤ by Paillat-dev
Project details
Release history Release notifications | RSS feed
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 dismoji-0.2.0.tar.gz.
File metadata
- Download URL: dismoji-0.2.0.tar.gz
- Upload date:
- Size: 127.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7781da8e5420b2e611df3315c4348f6358fd2bff409e7abed729376a25da16d7
|
|
| MD5 |
591f779414fb0f9b4f47cfc5890a7158
|
|
| BLAKE2b-256 |
4b9f584ee697b7c88a6162d2ad60a3923a53b6c372dcf67ac8e53b3e60c36bbe
|
File details
Details for the file dismoji-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dismoji-0.2.0-py3-none-any.whl
- Upload date:
- Size: 132.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d74dffa09790ed39a3e18fb24c31227f874d4e3823e29178c7eb0562b4702717
|
|
| MD5 |
14390d83d51302674e9d13f0313d0759
|
|
| BLAKE2b-256 |
53750b2f2f59778a55d557e6e81351e4bfd4b0d2472a98252c01747d443e3f7f
|