Giter VIP home page Giter VIP logo

emoji's Introduction

Emoji

Emoji for Python. This project was inspired by kyokomi.

Example

The entire set of Emoji codes as defined by the unicode consortium is supported in addition to a bunch of aliases. By default, only the official list is enabled but doing emoji.emojize(use_aliases=True) enables both the full list and aliases.

>> import emoji
>> print(emoji.emojize('Python is :thumbs_up:'))
Python is ๐Ÿ‘
>> print(emoji.emojize('Python is :thumbsup:', use_aliases=True))
Python is ๐Ÿ‘
>> print(emoji.demojize('Python is ๐Ÿ‘'))
Python is :thumbs_up:
>>> print(emoji.emojize("Python is fun :red_heart:"))
Python is fun โค
>>> print(emoji.emojize("Python is fun :red_heart:",variant="emoji_type"))
Python is fun โค๏ธ #red heart, not black heart

By default, the language is English (language='en') but Spanish ('es') and Portuguese ('pt') are also supported.

>> print(emoji.emojize('Python es :pulgar_hacia_arriba:', language='es'))
Python es ๐Ÿ‘
>> print(emoji.demojize('Python es ๐Ÿ‘', language='es'))
Python es :pulgar_hacia_arriba:
>>> print(emoji.emojize("Python รฉ :polegar_para_cima:", language='pt'))
Python รฉ ๐Ÿ‘
>>> print(emoji.demojize("Python รฉ ๐Ÿ‘", language='pt'))
Python รฉ :polegar_para_cima:๏ธ

Installation

Via pip:

$ pip install emoji --upgrade

From master branch:

$ git clone https://github.com/carpedm20/emoji.git
$ cd emoji
$ python setup.py install

Developing

$ git clone https://github.com/carpedm20/emoji.git
$ cd emoji
$ pip install -e .\[dev\]
$ nosetests

The utils/get-codes-from-unicode-consortium.py may help when updating unicode_codes.py but is not guaranteed to work. Generally speaking it scrapes a table on the Unicode Consortium's website with BeautifulSoup and prints the contents to stdout in a more useful format.

Links ----

For English:

Emoji Cheat Sheet

Official unicode list

For Spanish:

Unicode list

For Portuguese:

Unicode list

Authors

Taehoon Kim / @carpedm20

Kevin Wurster / @geowurster

emoji's People

Contributors

carpedm20 avatar geowurster avatar manueltonneau avatar ryancallihan avatar vantuz avatar davidholland avatar harmon758 avatar neelshah18 avatar ananyatyagi avatar roxxers avatar andreif avatar sigoa avatar ynh avatar tbartelmess avatar ryan-relativeinsight avatar nicholaswon47 avatar edschofield avatar jimcurrywang avatar andyischaos avatar fozar avatar jaebradley avatar jackenmen avatar dgw avatar thelvey avatar fryie avatar patcon avatar paolostivanin avatar orarbel avatar kmosiejczuk avatar jefforkin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.