The emoji package for Python turns :shortcode: aliases into Unicode emoji and back. It supports the official Unicode list plus optional alias mode.
Overview
Emoji for Python helps applications render and parse emoji in strings. Functions emojize and demojize map between colon-wrapped names and Unicode characters, with the full consortium code list enabled by default and an alias language mode for unofficial names.
Optional language parameters localize shortcodes for Spanish, Portuguese, Italian, French, German, and several other locales listed in the documentation. The isemoji helper tests whether a string is a single emoji character, and emojize accepts a variant option to control emoji presentation style.
The package installs via pip and is suitable for logging, chat bots, CLI tools, and any Python program that prints user-facing text containing emoji. Unicode data in the project is generated from consortium tables using bundled maintenance scripts.
Authors and maintainers are credited in project documentation, with links to cheat sheets and official Unicode references per language.
Key features
- emojize and demojize conversion functions
- Official Unicode emoji codes plus aliases
- Multiple localized shortcode languages
- Emoji presentation variant option
- isemoji detection helper
- pip-installable Python package
Use cases
- Rendering shortcodes in Python terminal output
- Normalizing user text for storage or search
- Building chat or notification formatters
- Localizing emoji names in non-English UIs