Skip to main content

PyPI - Version PyPI - Python Version PyPI - Types PyPI - License GitHub Actions Workflow Status


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() and dismoji.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:

Development

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Install development dependencies: pdm install -G dev
  5. Run checks: pdm run lint, pdm run format, pdm run typecheck
  6. Run tests: pdm run test
  7. Submit a pull request

Development Tools:

  • PDM: For dependency management
  • Ruff: For linting and formatting
  • Licensor: For managing license headers
  • basedpyright: For type checking

Acknowledgements

  • emoji as inspiration for the API design

License

MIT License - Copyright (c) 2025 Paillat-dev


Made with ❤ by Paillat-dev

Metadata

Release files for dismoji 0.5.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 dismoji 0.5.0
File Size Uploaded Provenance Actions
dismoji-0.5.0.tar.gz 128.3 kB Without provenance Details for dismoji-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 261.0 kB

Release files / dismoji-0.5.0.tar.gz

Download URL dismoji-0.5.0.tar.gz
Size 128.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f1bec644287c32e0fb9fa1d2fc8576d1fb7f7bd7d66f8f03ff672e97271a6a5b
BLAKE2b-256 checksum
How to use checksums
c5b24db396f8e1725d00484bcc3c0cf9ecb815acc44b94f52b9aed8779e65c29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Release files / dismoji-0.5.0-py3-none-any.whl

Download URL dismoji-0.5.0-py3-none-any.whl
Size 132.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
288c14aee5c1a29f392d183ea5d78276cc25b5a684400fdcfcf64d25b709a41b
BLAKE2b-256 checksum
How to use checksums
60b22a5c76ccc03f2774ac32b8c3af3db39f9b95af997d1af309fc488df0a2ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Security for dismoji 0.5.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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