1 hour ago · Tech · hide · 0 comments

New package just landed! emojet is an emoji library for Python: it converts between emoji and their names, in both directions, plus the searching and lookup functions that go with that. It covers the core API of the emoji package, a library that been available for this job since 2014, using the same names and the same data. The difference is that emojet does the work in Rust, running 3.5x faster for conversion, 70 times faster for deconversion, and using about 40% less memory. Use emojize() to convert names to emoji: >>> import emojet >>> emojet.emojize("Python is fun :thumbs_up:") 'Python is fun 👍' …and demojize() to deconvert emoji to their names: >>> emojet.demojize("Python is fun 👍") 'Python is fun :thumbs_up:' Names come in 14 languages, plus the English aliases that GitHub and Slack use: >>> emojet.emojize("Python ist toll :daumen_hoch:", language="de") 'Python ist toll 👍' >>> emojet.emojize("Python is fun :thumbsup:", language="alias") 'Python is fun 👍' See the documentation…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.