Skip to content

bcongdon/python-emojipedia

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

python-emojipedia

Build Status Code Climate PyPI version Documentation Status Test Coverage

Emoji data from Emojipedia 😎

Basic Usage

>>>from emojipedia import Emojipedia
>>>taco = Emojipedia.search('taco')
>>>taco
# <Emoji - 'Taco' - character: 🌮, description: A taco; a Mexican fo...>

Installation:

To install, simply run pip install emojipedia.

To install from source, run the following from within the main project directory:

python setup.py build
python setup.py install

Usage:

from emojipedia import Emojipedia

# Search for emoji by title
taco = Emojipedia.search('taco')

# Emojipedia description
print(taco.description)  # "A taco; a Mexican food item displayed with a variety of fillings. ..."

# Emojipedia codepoints
print(taco.codepoints)  # "U+1F32E"

# Emojipedia listed platforms 
# Contains title, Emojipedia platform url, and platform specific emoji img url
platforms = taco.platforms 
print(platforms[0])  # Platform(name=u'Apple', image_url=u'.../taco_1f32e.png')

joy = Emojipedia.search('face-with-tears-of-joy')
# Emoji shortcodes
joy.shortcodes  # ":joy:"

# Search for emoji by emoji
smirk = Emojipedia.search('😏')
# Custom Emoji string preview
print(str(smirk))  # <Emoji - 'Smirking Face' - character: 😏, description: A sly smile, often u...>

# Get a category of emoji
people = Emojipedia.category('people')
people[0].title  # <Emoji - 'Grinning Face' - character: 😀, description: A face with a big op...>
print(len(people))  # 306

# Get all the emoji
# NOTE: This is temporarily broken, as it seems visiting emojipedia.org/emoji always times out
emojis = Emojipedia.all()
print(len(emojis))  # 2621
for emoji in emojis:
    print(emoji.title)

Documentation

Read more about python-emojipedia on the ReadTheDocs page.

Contributing

Contributions to python-emojipedia are welcomed! 😁

  1. Fork the repo.
  2. Create a new feature branch.
  3. Add your feature / make your changes.
  4. Install pep8 and run pep8 *.py in the root project directory to lint your changes. Fix any linting errors.
  5. Create a PR.
  6. ???
  7. 🎉 Profit. 🎉