Emojis for Python π π π
To install the emojislib run:
pip install emojislibemojis.Emojis is a dict which contains all emojis available in emojislib.There are two main types of methods in emojislib ,by_ and search_by_.
by_name
get one emoji by name
import emojislib as emojis
emoji = emojis.by_name('eyes')
print("name:",emoji.name)
print("char:",emoji.char)
print("category:",emoji.category)
print("keywords:",emoji.keywords)output:
name: eyes
char: π
category: people
keywords: ('look', 'watch', 'stalk', 'peek', 'see')
by_cate
get a list of emoji(s) by category.
emoji = emojis.by_cate('animals_and_nature')
print(emoji)output:
animals_and_nature [ π, π΅, π, π, π, π, β‘]
by_key
get a list of emoji(s) by keywords.
emoji = emojis.by_key('winter')
print("winter:",emoji)winter: [βοΈ, β, β, πΏ, β·, π, π]
Thers are 3 search_by_... methods:
search_by_namesearch_by_keysearch_by_cate
Just replace get emoji(s) by a exact str with get emoji(s) by a part of a exact str compared with by_....