Skip to main content

Adds support for emoji-strings in Python, which convert emoji names into actual emoji.

Project description

Adds support for emoji-strings in Python, which convert emoji names into actual emoji.


Linux Test Status Windows Test Status macOS Test Status Coverage


PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel


GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads


CodeFactor Grade Flake8 Status mypy status status


License GitHub top language Requirements Status


emoji-strings can be installed from PyPI.

To install with pip:

$ python -m pip install emoji-strings


Emoji strings (g-strings for short) are similar to Python’s f-strings. However, rather than using curly braces, g-strings use colons to mark emoji in a string. For example, in the following sentence, :rocket: denotes a substitution, in this case for a 🚀 emoji:

Deploy the app :rocket:

In a Python source file, you can write this as:

print(g"Deploy the app :rocket:")
#     ^ note the "g" prefix character

which would print:

Deploy the app 🚀

Ta da! You no longer need to remember unicode code points or use cumbersome emoji entry dialogs. To enable this magic, add the following comment to the top of your python source file:

# -*- coding: emoji_strings -*-

and add emoji-strings to your requirements.txt file.


This is a joke.

While this absolutely does work I made it for fun. Someone had asked me if, since Python has f-strings, it also has g-strings? It does now.


Based on future-fstrings, and uses the emoji library to parse the emoji names.

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

emoji_strings-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded source

Built Distribution

emoji_strings-0.1.0-py3-none-any.whl (14.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page