Skip to main content

A basic emoji manipulator for Python.

Project description

https://raw.githubusercontent.com/Ombucha/emojis.py/main/banner.png PyPI version PyPI downloads Lines of code Repository size
โœจ A lightweight, expressive emoji utility library for Python ๐Ÿ’ป๐Ÿ
๐ŸŽ‰ Supports emoji lookup, search, and emoji-kitchen-style combos โ€” all offline and blazing fast โšก
No dependencies โ€” just pure emoji magic ๐Ÿช„

๐Ÿš€ Features

  • ๐Ÿ” Emoji lookup by name, alias, unicode, hexcode, shortcode, or order

  • ๐Ÿง  Fast emoji search by keyword, label, shortcode, or tag

  • ๐Ÿณ Emoji Kitchen-style mashups (Google Emoji Kitchen)

  • ๐Ÿท๏ธ Convert between emoji and shortcode (emojize/demojize)

  • ๐Ÿงฉ Emoji grouping and subgrouping

  • ๐Ÿ“ฆ Bundled emoji data, no internet required

  • ๐Ÿช„ Zero dependencies, pure Python

๐Ÿ“– Usage & Quick Start

from emojis import (
    is_emoji, emoji_count,
    get_emoji_from_name, get_emoji_from_hexcode, get_emoji_from_shortcode, get_emoji_from_order,
    get_all_emojis, emojize, demojize,
    get_group, get_subgroup, get_all_groups, get_all_subgroups,
    emoji_kitchen, search_emojis, Emoji
)

# Check if a character is an emoji
print(is_emoji("๐Ÿ”ฅ"))  # True

# Count emojis in a string
print(emoji_count("I love ๐Ÿ• and ๐Ÿ!"))  # 2

# Lookup emoji by name, hexcode, shortcode, or order
print(get_emoji_from_name("grinning face").emoji)  # ๐Ÿ˜€
print(get_emoji_from_hexcode("1F525").emoji)       # ๐Ÿ”ฅ
print(get_emoji_from_shortcode("fire").emoji)      # ๐Ÿ”ฅ
print(get_emoji_from_order(0).emoji)               # First emoji in database

# List all emojis (print only emoji characters)
all_emojis = get_all_emojis()
print([e.emoji for e in all_emojis[:5]])  # ['๐Ÿ˜€', '๐Ÿ˜ƒ', '๐Ÿ˜„', ...]

# Convert shortcodes to emojis and vice versa
print(emojize("I am :fire:!"))  # I am ๐Ÿ”ฅ!
print(demojize("I am ๐Ÿ”ฅ!"))     # I am :fire:!

# Emoji details and grouping
emoji = Emoji("๐Ÿฆ„")
print(emoji.label)              # 'unicorn'
print(get_group(emoji).name)    # Group name
print(get_subgroup(emoji).name) # Subgroup name

# List all groups and subgroups (print names)
print([g.name for g in get_all_groups()])
print([sg.name for sg in get_all_subgroups()])

# Emoji Kitchen-style combo (returns a URL)
print(emoji_kitchen(Emoji("๐Ÿฅฒ"), Emoji("๐Ÿ˜Ž")))

# Search for emojis by keyword, label, shortcode, or tag (print emoji characters)
print([e.emoji for e in search_emojis("cat")])     # ['๐Ÿฑ', '๐Ÿ˜บ', ...]

๐Ÿ“ฆ Included Emoji Data

This library bundles static emoji data from:

All data is included upfront โ€” no runtime fetching or internet required ๐Ÿ”’

โš™๏ธ Installation

Requires Python 3.8+ ๐Ÿ

To install the latest stable release:

# Unix / macOS ๐ŸŽ๐Ÿง
python3 -m pip install "emojis.py"

# Windows ๐ŸชŸ
py -m pip install "emojis.py"

To install the development version:

git clone https://github.com/Ombucha/emojis.py
cd emojis.py
pip install -e .

๐Ÿ™Œ Contributing

Contributions are welcome! If you have suggestions, bug reports, or want to add features, please open an issue or submit a pull request on GitHub.

  • Read the Contributing Guide for best practices.

  • Make sure your code is tested and documented.

  • Be kind and respectful in all interactions.

Thank you for helping make emojis.py better! ๐ŸŽ‰

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emojis_py-1.2.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emojis_py-1.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file emojis_py-1.2.0.tar.gz.

File metadata

  • Download URL: emojis_py-1.2.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for emojis_py-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2bdf7adc760ec4200d024883a948b5b11c60ae17cf3d6b8447ac083aa2a70844
MD5 8630a9a97ab38ae419ef97f8a655fbde
BLAKE2b-256 614b0f89c1111f72a27b7425f2aaed898c7cee2d41ede3c9668eb1de29ad8a0f

See more details on using hashes here.

File details

Details for the file emojis_py-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: emojis_py-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for emojis_py-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abe71c87fd282c22a3af7db7fb74c374b8ca3ab2cb3946b47c5b73d1c333cea9
MD5 9094a9e2bc3367c8f04a047b0d4a3692
BLAKE2b-256 161750efd85ab3f2f3485094229ac71df3f98d28742ecae675544eb1a64c4f26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page