emojis

Emojis for Python


Keywords
python, emoji, emojis, unicode, emojify, python3
License
MIT
Install
pip install emojis==0.7.0

Documentation

Emojis

Documentation Status Build Status PyPI PyPI - Python Version

Emojis for Python

About

This library allows you to emojify content such as: This is a message with emojis :smile: :snake:

Emoji database is based on gemoji library.

Example

>>> 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', unicode_version='6.0')

>>> emojis.db.get_categories()
{'Activities', 'Travel & Places', 'Smileys & Emotion', 'Symbols', 'Food & Drink', 'Animals & Nature', 'People & Body', 'Objects', 'Flags'}

Installation

Install emojis with pip.

pip3 install -U emojis

Documentation

https://emojis.readthedocs.io/

Missing or wrong emoji?

This library is based on gemoji database, the official GitHub emoji library for Ruby.

If an emoji is missing or labeled wrongly, report to gemoji project. If gemoji fix it, this library will be updated as soon as there's a new gemoji release.

All issues complaining about missing emojis will be closed.

All PRs to include custom emojis will be closed.

License

MIT