Emojis for Python
This library allows you to emojify content such as: This is a message with emojis :smile: :snake:
See the Emoji cheat sheet for more aliases.
Emoji database based on gemoji.
>>> import emojis
>>> emojis.encode('This is a message with emojis :smile: :snake:')
'This is a message with emojis 😄 🐍'
>>> emojis.decode('This is a message with emojis 😄 🐍')
'This is a message with emojis :smile: :snake:'
>>> emojis.get('Prefix 😄 🐍 😄 🐍 Sufix')
{'😄', '🐍'}
>>> emojis.count('😄 🐍 😄 🐍')
4
>>> emojis.count('😄 🐍 😄 🐍', unique=True)
2
>>> emojis.db.get_emoji_by_alias('snake')
Emoji(aliases=['snake'], emoji='🐍', tags=[], category='Animals & Nature')
>>> emojis.db.get_categories()
{'Activities', 'Travel & Places', 'Smileys & Emotion', 'Symbols', 'Food & Drink', 'Animals & Nature', 'People & Body', 'Objects', 'Flags'}
Install emojis
with pip
.
pip3 install -U emojis
https://emojis.readthedocs.io/
MIT