Skip to main content

No project description provided

Project description

emojify-text

A simple Python utility to automatically add emojis to your text based on keywords.

Features

Appends emojis: Finds keywords and appends emojis: "I love my dog" -> "I love ❤️ my dog 🐶"

Replaces emojis: Optionally replaces keywords with emojis: "I love my dog" -> "I ❤️ my 🐶"

Case-insensitive: Matches keywords regardless of case.

Word boundaries: Won't replace "cat" in "caterpillar".

Zero dependency: No other libraries required.

Installation

pip install emojify-text

Usage

Here is a basic example of the default behavior (appending emojis).

from emojify_text import emojify

my_text = "I am so happy to drink my coffee and code. I love my cat!"

Default mode (append emoji)

emojified_text = emojify(my_text) print(emojified_text)

--- Output ---

"I am so happy 😊 to drink my coffee ☕ and code 💻. I love ❤️ my cat 🐱!"

Functions

emojify(text, replace=False)

This is the main function to emojify a string.

text (str): The input text you want to convert.

replace (bool, optional): Controls the replacement behavior.

If False (default), appends the emoji after the word.

If True, replaces the word entirely with the emoji.

Returns: (str) The emojified text.

Example of replace=True:

from emojify_text import emojify

my_text = "I am so happy to drink my coffee and code. I love my cat!"

replaced_text = emojify(my_text, replace=True) print(replaced_text)

--- Output ---

"I am so 😊 to drink my ☕ and 💻. I ❤️ my 🐱!"

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.0

Download files

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

Source Distribution

emotify-0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

emotify-0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file emotify-0.0.tar.gz.

File metadata

  • Download URL: emotify-0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for emotify-0.0.tar.gz
Algorithm Hash digest
SHA256 0f6c7fd3f63f9917300eba093fd46b7ab7fb298a3ad05a80576aaf2e808f5f72
MD5 97e531e43d68cd78bce25d72ff726ed2
BLAKE2b-256 67f18bf86fc5d3cd38249d27c56ede0da435e5e69fa94725f2c9cd80a256a965

See more details on using hashes here.

File details

Details for the file emotify-0.0-py3-none-any.whl.

File metadata

  • Download URL: emotify-0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for emotify-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8bbaa36cda5606e59ed4668b48c9c27d34333f4354e52ca74f4a864956f9383
MD5 322d3622bf1f3224588a96dd155094a4
BLAKE2b-256 7c7b5c71e0eff8dff201afac74fab843bd2ecae3f71f435ad73432e801f2ca25

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