https://github.com/ombucha/emojis.py
A basic emoji manipulator for Python.
https://github.com/ombucha/emojis.py
emoji emojis emojis-py python python-3 python3
Last synced: 3 months ago
JSON representation
A basic emoji manipulator for Python.
- Host: GitHub
- URL: https://github.com/ombucha/emojis.py
- Owner: Ombucha
- License: mit
- Created: 2025-05-29T05:39:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-05T10:15:57.000Z (about 1 year ago)
- Last Synced: 2025-06-05T10:49:22.793Z (about 1 year ago)
- Topics: emoji, emojis, emojis-py, python, python-3, python3
- Language: Python
- Homepage: https://emoji.readthedocs.io
- Size: 0 Bytes
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
.. image:: https://raw.githubusercontent.com/Ombucha/emojis.py/main/banner.png
.. image:: https://img.shields.io/pypi/v/emojis.py
:target: https://pypi.python.org/pypi/emojis.py
:alt: PyPI version
.. image:: https://static.pepy.tech/personalized-badge/emojis.py?period=total&left_text=downloads&left_color=grey&right_color=red
:target: https://pypi.python.org/pypi/emojis.py
:alt: PyPI downloads
.. image:: https://sloc.xyz/github/Ombucha/emojis.py?lower=True
:target: https://github.com/Ombucha/emojis.py/graphs/contributors
:alt: Lines of code
.. image:: https://img.shields.io/github/repo-size/Ombucha/emojis.py?color=yellow
:target: https://github.com/Ombucha/emojis.py
:alt: Repository size
| โจ A lightweight, expressive emoji utility library for Python ๐ป๐
| ๐ Supports emoji lookup, search, and emoji-kitchen-style combos โ all offline and blazing fast โก
| No dependencies โ just pure emoji magic ๐ช
๐ Features
-----------
- ๐ Emoji lookup by name, alias, unicode, hexcode, shortcode, or order
- ๐ง Fast emoji search by keyword, label, shortcode, or tag
- ๐ณ Emoji Kitchen-style mashups (Google Emoji Kitchen)
- ๐ท๏ธ Convert between emoji and shortcode (emojize/demojize)
- ๐งฉ Emoji grouping and subgrouping
- ๐ฆ Bundled emoji data, no internet required
- ๐ช Zero dependencies, pure Python
๐ Usage & Quick Start
----------------------
.. code-block:: python
from emojis import (
is_emoji, emoji_count,
get_emoji_from_name, get_emoji_from_hexcode, get_emoji_from_shortcode, get_emoji_from_order,
get_all_emojis, emojize, demojize,
get_group, get_subgroup, get_all_groups, get_all_subgroups,
emoji_kitchen, search_emojis, Emoji
)
# Check if a character is an emoji
print(is_emoji("๐ฅ")) # True
# Count emojis in a string
print(emoji_count("I love ๐ and ๐!")) # 2
# Lookup emoji by name, hexcode, shortcode, or order
print(get_emoji_from_name("grinning face").emoji) # ๐
print(get_emoji_from_hexcode("1F525").emoji) # ๐ฅ
print(get_emoji_from_shortcode("fire").emoji) # ๐ฅ
print(get_emoji_from_order(0).emoji) # First emoji in database
# List all emojis (print only emoji characters)
all_emojis = get_all_emojis()
print([e.emoji for e in all_emojis[:5]]) # ['๐', '๐', '๐', ...]
# Convert shortcodes to emojis and vice versa
print(emojize("I am :fire:!")) # I am ๐ฅ!
print(demojize("I am ๐ฅ!")) # I am :fire:!
# Emoji details and grouping
emoji = Emoji("๐ฆ")
print(emoji.label) # 'unicorn'
print(get_group(emoji).name) # Group name
print(get_subgroup(emoji).name) # Subgroup name
# List all groups and subgroups (print names)
print([g.name for g in get_all_groups()])
print([sg.name for sg in get_all_subgroups()])
# Emoji Kitchen-style combo (returns a URL)
print(emoji_kitchen(Emoji("๐ฅฒ"), Emoji("๐")))
# Search for emojis by keyword, label, shortcode, or tag (print emoji characters)
print([e.emoji for e in search_emojis("cat")]) # ['๐ฑ', '๐บ', ...]
๐ฆ Included Emoji Data
----------------------
This library bundles static emoji data from:
- `emojibase.dev `_ ๐ง
- `emoji-kitchen-backend by xsalazar `_ ๐ณ
All data is included upfront โ no runtime fetching or internet required ๐
โ๏ธ Installation
---------------
**Requires Python 3.8+ ๐**
To install the latest stable release:
.. code-block:: sh
# Unix / macOS ๐๐ง
python3 -m pip install "emojis.py"
# Windows ๐ช
py -m pip install "emojis.py"
To install the development version:
.. code-block:: sh
git clone https://github.com/Ombucha/emojis.py
cd emojis.py
pip install -e .
๐ Contributing
---------------
Contributions are welcome!
If you have suggestions, bug reports, or want to add features, please open an issue or submit a pull request on GitHub.
- Read the `Contributing Guide `_ for best practices.
- Make sure your code is tested and documented.
- Be kind and respectful in all interactions.
Thank you for helping make emojis.py better! ๐
๐ Links
--------
| ๐ `Documentation `_
| ๐ฆ `PyPI Package `_
| ๐ `Unicode Full Emoji List `_
| ๐ `Emojipedia `_
|
๐งช Explore, search, and play with emojis in Python โ your code just got way more expressive! ๐๐จ๐