Skip to main content

IMOJIFY

a python library that maps almost every emoji to its color image

it's used to get visual representation of emoji unicode

imojify can be used to solve the problem of plotting emojis as labels in python plotting libraries

Installation

    pip install imojify

Quickstart

Get emoji Image

from PIL import Image

from imojify import imojify

Image.open(imojify.get_img_path('😂'))

output

multiple emoji is also supported

from PIL import Image

from imojify import imojify

Image.open(imojify.get_img_path('😂😂😂😂'))

output

Plotting emojis in matplotlib

from imojify import imojify

from matplotlib import pyplot as plt 

from matplotlib.offsetbox import OffsetImage,AnnotationBbox

def offset_image(cords, emoji, ax):

    img = plt.imread(imojify.get_img_path(emoji))

    im = OffsetImage(img, zoom=0.08)

    im.image.axes = ax

    ab = AnnotationBbox(im, (cords[0], cords[1]),  frameon=False, pad=0)

    ax.add_artist(ab)







emjis = ['😂', '🤣', '😔', '😏','😍', '🥰', '😘']

values =[30, 50, 15, 29, 15, 50, 12]



fig, ax = plt.subplots(figsize=(12,8))

ax.bar(range(len(emjis)), values, width=0.5,align="center")

ax.set_xticks(range(len(emjis)))

ax.set_xticklabels([])

ax.tick_params(axis='x', which='major', pad=26)

ax.set_ylim((0, ax.get_ylim()[1]+10))



for i, e in enumerate(emjis):

    offset_image([i,values[i]+5], e, ax)

output

Metadata

Release files for imojify 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imojify 0.1.1
File Size Uploaded
imojify-0.1.1.tar.gz 141.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for imojify 0.1.1
File Interpreter ABI Platform
imojify-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 283.8 MB

Release files / imojify-0.1.1.tar.gz

Download URL imojify-0.1.1.tar.gz
Size 141.7 MB
Tags Source
SHA-256 checksum
How to use checksums
9f714ebe56082fd744a44e8414be0db6e4f3db369baded1918bafeb90476cf61
BLAKE2b-256 checksum
How to use checksums
a39d677c7833193fdae949803ccb10ff8388b0de1a51c03718c5ffac43eedc73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / imojify-0.1.1-py3-none-any.whl

Download URL imojify-0.1.1-py3-none-any.whl
Size 142.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
51897408a2ca1b6b603f31c20db99505f5c58fffa754e4b51253d99c6db679e0
BLAKE2b-256 checksum
How to use checksums
9510d5680b4a0eb7e980b8367b6da179a516eeb8adbc1a2019e421253d6d63fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page