# ๐ Emojify Python - The Ultimate Emoji Programming Experience
**Transform Python into a fully emoji-powered language!** Import modules, write operators, create classes, and more - all with emojis!
๐ **v1.1.0 Released**: Now with 200+ pre-configured emoji mappings!
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/py/emojify-python)
## ๐ Features
### โจ Core Features
- ๐ฏ **Import modules using emojis**: `import ๐ผ` for pandas
- ๐ **Emoji aliases**: `import pandas as ๐ผ`
- ๐ฆ **Emoji variables**: `๐ฒ = random.randint(1, 6)`
- ๐จ **Custom mappings**: Map any emoji to any module
### ๐ Enhanced Features (v1.1.0)
- ๐ **200+ Pre-configured Mappings**: Data science, AI/ML, web, cloud, blockchain, and more!
- ๐ฏ **Popular Preset Sets**: Quick setup with `load_popular_set('data_science')`
- ๐ **Module Aliases**: Multiple emojis for same module (๐ข๐ฃ#๏ธโฃ โ numpy)
- โโโ๏ธโ **Emoji operators**: Math with `x โ y`, `a โ๏ธ b`
- ๐จ **Emoji decorators**: Time functions, cache results, handle errors
- ๐ **Emoji control flow**: `โ` for if, `๐` for loops
- ๐ **Emoji functions & classes**: Define with emojis
- ๐ฅ๏ธ **Emoji REPL**: Interactive Python with full emoji support
- ๐ **Emoji type hints**: Type annotations with emojis
- ๐จ **Syntax highlighting**: Beautiful colored emoji code
- ๐ **Emoji file support**: Save code as `.๐` files
- โ **Better error messages**: Context-aware emoji error handling
- ๐งช **Emoji assertions**: Testing with emoji asserts
## ๐ฆ Installation
```bash
pip install emojify-python
```
## ๐ Quick Start
### Basic Usage
```python
from emojify_python import enable
# Enable emoji imports globally
enable()
# Now you can import using emojis!
import ๐ผ # Imports pandas
import ๐ # Imports matplotlib
import ๐ข # Imports numpy
# Use emoji aliases
import pandas as ๐ผ
import numpy as ๐ข
# Create emoji variables
๐ฒ = ๐ผ.DataFrame({'data': [1, 2, 3]})
๐ = ๐ฒ.plot()
```
### Context Manager
Use emojis only within a specific context:
```python
from emojify_python import emojified
with emojified():
import ๐ผ
๐ฒ = ๐ผ.DataFrame({'data': [1, 2, 3]})
print(๐ฒ)
# Outside the context, emoji imports won't work
```
### Decorator
Enable emoji imports for specific functions:
```python
from emojify_python import emojify_function
@emojify_function
def analyze_data():
import ๐ผ
import ๐
๐ฒ = ๐ผ.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
๐.pyplot.plot(๐ฒ['x'], ๐ฒ['y'])
return ๐ฒ
```
## ๐บ๏ธ Default Emoji Mappings
### Data Science & Analysis
- ๐ผ โ `pandas`
- ๐ โ `matplotlib`
- ๐ข โ `numpy`
- ๐งฎ โ `scipy`
- ๐ค โ `sklearn`
- ๐ โ `seaborn`
### Web Frameworks
- ๐ โ `flask`
- โก โ `fastapi`
- ๐ช โ `django`
- ๐ โ `requests`
### Utilities
- ๐
โ `datetime`
- ๐ โ `re`
- ๐ โ `pathlib`
- ๐ฒ โ `random`
- ๐ฆ โ `json`
- ๐ โ `hashlib`
[See all mappings](https://github.com/arpanghoshal/emojify-python/blob/main/emojify_python/mappings.py)
## ๐จ Custom Mappings
### Add Your Own Mappings
```python
from emojify_python import add_mapping, enable
# Add custom mapping
add_mapping('๐ฎ', 'pygame')
add_mapping('๐จ', 'pillow')
enable()
# Now use your custom emojis
import ๐ฎ
import ๐จ
๐ฎ.init()
```
### View and Manage Mappings
```python
from emojify_python import (
view_mappings,
list_mappings,
search_mapping,
update_default_mapping,
save_custom_mappings,
load_custom_mappings
)
# View all mappings
all_mappings = view_mappings()
# Search for specific mappings
results = search_mapping('pandas') # Find mappings related to pandas
# List mappings by category
data_mappings = view_mappings(category='data')
# Update default mappings (use with caution)
update_default_mapping('๐', 'new_module')
# Save custom mappings to file
save_custom_mappings('my_mappings.json')
# Load custom mappings from file
load_custom_mappings('my_mappings.json')
```
## ๐ ๏ธ Advanced Usage
### Execute Emoji Code
```python
from emojify_python import exec_emoji_code
code = '''
import ๐ผ
import ๐ข
๐ฒ = ๐ผ.DataFrame({
'x': ๐ข.array([1, 2, 3]),
'y': ๐ข.array([4, 5, 6])
})
print(๐ฒ.describe())
'''
exec_emoji_code(code)
```
### Compile Emoji Code
```python
from emojify_python import compile_emoji_code
code = "๐ฒ = [i for i in range(10)]"
compiled = compile_emoji_code(code)
exec(compiled)
```
## ๐ฎ Command Line Interface
Emojify Python comes with a CLI tool:
```bash
# List all emoji mappings
python -m emojify_python list
# Search for mappings
python -m emojify_python search pandas
# Add custom mapping
python -m emojify_python add ๐ฎ pygame
# Run a Python file with emoji support
python -m emojify_python run my_emoji_script.py
```
## ๐ Examples
### Data Analysis with Emojis
```python
from emojify_python import enable
enable()
import ๐ผ as pd
import ๐ข as np
import ๐ as mpl
# Create data
๐ฒ = pd.DataFrame({
'๐
': pd.date_range('2024-01-01', periods=100),
'๐': np.random.randn(100).cumsum(),
'๐': np.random.randn(100).cumsum()
})
# Plot data
๐ผ๏ธ = ๐ฒ.plot(x='๐
', y=['๐', '๐'])
mpl.pyplot.show()
```
### Web API with Emojis
```python
from emojify_python import enable
enable()
from ๐ import Flask, jsonify
import ๐
as datetime
๐ = Flask(__name__)
@๐.route('/api/time')
def get_time():
โฐ = datetime.datetime.now()
return jsonify({'time': str(โฐ)})
if __name__ == '__main__':
๐.run(debug=True)
```
### Machine Learning Pipeline
```python
from emojify_python import enable
enable()
import ๐ผ as pd
import ๐ข as np
from ๐ค import model_selection, ensemble
# Load data
๐ = pd.read_csv('data.csv')
๐ฏ = ๐['target']
๐ฅ = ๐.drop('target', axis=1)
# Split data
X_train, X_test, y_train, y_test = model_selection.train_test_split(
๐ฅ, ๐ฏ, test_size=0.2, random_state=42
)
# Train model
๐ณ = ensemble.RandomForestClassifier()
๐ณ.fit(X_train, y_train)
# Evaluate
๐ = ๐ณ.score(X_test, y_test)
print(f"Accuracy: {๐}")
```
## ๐ค How It Works
Emojify Python uses Python's import hook system to intercept import statements and translate emoji names to their corresponding module names. It:
1. **Registers a custom import finder** in `sys.meta_path`
2. **Transforms emoji identifiers** to valid Python names using AST manipulation
3. **Maps emojis to modules** using a configurable dictionary
4. **Maintains compatibility** with standard Python imports
## โ ๏ธ Limitations
- Emoji support in Python is handled through transformation, not native support
- Some IDEs may not provide autocomplete for emoji imports
- Debugging may show transformed names instead of emojis
- Not recommended for production code (but great for fun projects!)
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- Inspired by the playful nature of Python
- Thanks to all contributors and emoji enthusiasts
- Special thanks to the Python import system documentation
## ๐ฎ Contact
- GitHub: [@arpanghoshal](https://github.com/arpanghoshal)
- PyPI: [emojify-python](https://pypi.org/project/emojify-python/)
---
**Remember**: While emoji imports are fun, use them responsibly! ๐
Raw data
{
"_id": null,
"home_page": "https://github.com/arpanghoshal/emojify-python",
"name": "emojify-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "emoji, import, fun, python, programming, emojify",
"author": "Arpan Ghoshal",
"author_email": "Arpan Ghoshal <contact@arpanghoshal.com>",
"download_url": "https://files.pythonhosted.org/packages/9d/09/caee2f17bb5b9ff70cf35b4db72608541d667b4766c1c68efbbbcfa9fb96/emojify_python-1.1.1.tar.gz",
"platform": null,
"description": "# \ud83d\udc0d Emojify Python - The Ultimate Emoji Programming Experience\n\n**Transform Python into a fully emoji-powered language!** Import modules, write operators, create classes, and more - all with emojis! \n\n\ud83c\udf89 **v1.1.0 Released**: Now with 200+ pre-configured emoji mappings! \n\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://badge.fury.io/py/emojify-python)\n\n## \ud83d\ude80 Features\n\n### \u2728 Core Features\n- \ud83c\udfaf **Import modules using emojis**: `import \ud83d\udc3c` for pandas\n- \ud83d\udd04 **Emoji aliases**: `import pandas as \ud83d\udc3c`\n- \ud83d\udce6 **Emoji variables**: `\ud83c\udfb2 = random.randint(1, 6)`\n- \ud83c\udfa8 **Custom mappings**: Map any emoji to any module\n\n### \ud83c\udd95 Enhanced Features (v1.1.0)\n- \ud83d\udcda **200+ Pre-configured Mappings**: Data science, AI/ML, web, cloud, blockchain, and more!\n- \ud83c\udfaf **Popular Preset Sets**: Quick setup with `load_popular_set('data_science')`\n- \ud83d\udd04 **Module Aliases**: Multiple emojis for same module (\ud83d\udd22\ud83d\udd23#\ufe0f\u20e3 \u2192 numpy)\n- \u2795\u2796\u2716\ufe0f\u2797 **Emoji operators**: Math with `x \u2795 y`, `a \u2716\ufe0f b`\n- \ud83c\udfa8 **Emoji decorators**: Time functions, cache results, handle errors\n- \ud83d\udd04 **Emoji control flow**: `\u2753` for if, `\ud83d\udd01` for loops\n- \ud83d\udcdd **Emoji functions & classes**: Define with emojis\n- \ud83d\udda5\ufe0f **Emoji REPL**: Interactive Python with full emoji support\n- \ud83d\udd0d **Emoji type hints**: Type annotations with emojis\n- \ud83c\udfa8 **Syntax highlighting**: Beautiful colored emoji code\n- \ud83d\udcc1 **Emoji file support**: Save code as `.\ud83d\udc0d` files\n- \u274c **Better error messages**: Context-aware emoji error handling\n- \ud83e\uddea **Emoji assertions**: Testing with emoji asserts\n\n## \ud83d\udce6 Installation\n\n```bash\npip install emojify-python\n```\n\n## \ud83d\ude80 Quick Start\n\n### Basic Usage\n\n```python\nfrom emojify_python import enable\n\n# Enable emoji imports globally\nenable()\n\n# Now you can import using emojis!\nimport \ud83d\udc3c # Imports pandas\nimport \ud83d\udcca # Imports matplotlib\nimport \ud83d\udd22 # Imports numpy\n\n# Use emoji aliases\nimport pandas as \ud83d\udc3c\nimport numpy as \ud83d\udd22\n\n# Create emoji variables\n\ud83c\udfb2 = \ud83d\udc3c.DataFrame({'data': [1, 2, 3]})\n\ud83d\udcc8 = \ud83c\udfb2.plot()\n```\n\n### Context Manager\n\nUse emojis only within a specific context:\n\n```python\nfrom emojify_python import emojified\n\nwith emojified():\n import \ud83d\udc3c\n \ud83c\udfb2 = \ud83d\udc3c.DataFrame({'data': [1, 2, 3]})\n print(\ud83c\udfb2)\n\n# Outside the context, emoji imports won't work\n```\n\n### Decorator\n\nEnable emoji imports for specific functions:\n\n```python\nfrom emojify_python import emojify_function\n\n@emojify_function\ndef analyze_data():\n import \ud83d\udc3c\n import \ud83d\udcca\n \n \ud83c\udfb2 = \ud83d\udc3c.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})\n \ud83d\udcca.pyplot.plot(\ud83c\udfb2['x'], \ud83c\udfb2['y'])\n return \ud83c\udfb2\n```\n\n## \ud83d\uddfa\ufe0f Default Emoji Mappings\n\n### Data Science & Analysis\n- \ud83d\udc3c \u2192 `pandas`\n- \ud83d\udcca \u2192 `matplotlib`\n- \ud83d\udd22 \u2192 `numpy`\n- \ud83e\uddee \u2192 `scipy`\n- \ud83e\udd16 \u2192 `sklearn`\n- \ud83d\udcc8 \u2192 `seaborn`\n\n### Web Frameworks\n- \ud83c\udf10 \u2192 `flask`\n- \u26a1 \u2192 `fastapi`\n- \ud83c\udfaa \u2192 `django`\n- \ud83d\ude80 \u2192 `requests`\n\n### Utilities\n- \ud83d\udcc5 \u2192 `datetime`\n- \ud83d\udd0d \u2192 `re`\n- \ud83d\udcc1 \u2192 `pathlib`\n- \ud83c\udfb2 \u2192 `random`\n- \ud83d\udce6 \u2192 `json`\n- \ud83d\udd10 \u2192 `hashlib`\n\n[See all mappings](https://github.com/arpanghoshal/emojify-python/blob/main/emojify_python/mappings.py)\n\n## \ud83c\udfa8 Custom Mappings\n\n### Add Your Own Mappings\n\n```python\nfrom emojify_python import add_mapping, enable\n\n# Add custom mapping\nadd_mapping('\ud83c\udfae', 'pygame')\nadd_mapping('\ud83c\udfa8', 'pillow')\n\nenable()\n\n# Now use your custom emojis\nimport \ud83c\udfae\nimport \ud83c\udfa8\n\n\ud83c\udfae.init()\n```\n\n### View and Manage Mappings\n\n```python\nfrom emojify_python import (\n view_mappings,\n list_mappings,\n search_mapping,\n update_default_mapping,\n save_custom_mappings,\n load_custom_mappings\n)\n\n# View all mappings\nall_mappings = view_mappings()\n\n# Search for specific mappings\nresults = search_mapping('pandas') # Find mappings related to pandas\n\n# List mappings by category\ndata_mappings = view_mappings(category='data')\n\n# Update default mappings (use with caution)\nupdate_default_mapping('\ud83c\udd95', 'new_module')\n\n# Save custom mappings to file\nsave_custom_mappings('my_mappings.json')\n\n# Load custom mappings from file\nload_custom_mappings('my_mappings.json')\n```\n\n## \ud83d\udee0\ufe0f Advanced Usage\n\n### Execute Emoji Code\n\n```python\nfrom emojify_python import exec_emoji_code\n\ncode = '''\nimport \ud83d\udc3c\nimport \ud83d\udd22\n\n\ud83c\udfb2 = \ud83d\udc3c.DataFrame({\n 'x': \ud83d\udd22.array([1, 2, 3]),\n 'y': \ud83d\udd22.array([4, 5, 6])\n})\nprint(\ud83c\udfb2.describe())\n'''\n\nexec_emoji_code(code)\n```\n\n### Compile Emoji Code\n\n```python\nfrom emojify_python import compile_emoji_code\n\ncode = \"\ud83c\udfb2 = [i for i in range(10)]\"\ncompiled = compile_emoji_code(code)\nexec(compiled)\n```\n\n## \ud83c\udfae Command Line Interface\n\nEmojify Python comes with a CLI tool:\n\n```bash\n# List all emoji mappings\npython -m emojify_python list\n\n# Search for mappings\npython -m emojify_python search pandas\n\n# Add custom mapping\npython -m emojify_python add \ud83c\udfae pygame\n\n# Run a Python file with emoji support\npython -m emojify_python run my_emoji_script.py\n```\n\n## \ud83d\udcda Examples\n\n### Data Analysis with Emojis\n\n```python\nfrom emojify_python import enable\nenable()\n\nimport \ud83d\udc3c as pd\nimport \ud83d\udd22 as np\nimport \ud83d\udcca as mpl\n\n# Create data\n\ud83c\udfb2 = pd.DataFrame({\n '\ud83d\udcc5': pd.date_range('2024-01-01', periods=100),\n '\ud83d\udcc8': np.random.randn(100).cumsum(),\n '\ud83d\udcc9': np.random.randn(100).cumsum()\n})\n\n# Plot data\n\ud83d\uddbc\ufe0f = \ud83c\udfb2.plot(x='\ud83d\udcc5', y=['\ud83d\udcc8', '\ud83d\udcc9'])\nmpl.pyplot.show()\n```\n\n### Web API with Emojis\n\n```python\nfrom emojify_python import enable\nenable()\n\nfrom \ud83c\udf10 import Flask, jsonify\nimport \ud83d\udcc5 as datetime\n\n\ud83d\ude80 = Flask(__name__)\n\n@\ud83d\ude80.route('/api/time')\ndef get_time():\n \u23f0 = datetime.datetime.now()\n return jsonify({'time': str(\u23f0)})\n\nif __name__ == '__main__':\n \ud83d\ude80.run(debug=True)\n```\n\n### Machine Learning Pipeline\n\n```python\nfrom emojify_python import enable\nenable()\n\nimport \ud83d\udc3c as pd\nimport \ud83d\udd22 as np\nfrom \ud83e\udd16 import model_selection, ensemble\n\n# Load data\n\ud83d\udcca = pd.read_csv('data.csv')\n\ud83c\udfaf = \ud83d\udcca['target']\n\ud83d\udce5 = \ud83d\udcca.drop('target', axis=1)\n\n# Split data\nX_train, X_test, y_train, y_test = model_selection.train_test_split(\n \ud83d\udce5, \ud83c\udfaf, test_size=0.2, random_state=42\n)\n\n# Train model\n\ud83c\udf33 = ensemble.RandomForestClassifier()\n\ud83c\udf33.fit(X_train, y_train)\n\n# Evaluate\n\ud83d\udcc8 = \ud83c\udf33.score(X_test, y_test)\nprint(f\"Accuracy: {\ud83d\udcc8}\")\n```\n\n## \ud83e\udd14 How It Works\n\nEmojify Python uses Python's import hook system to intercept import statements and translate emoji names to their corresponding module names. It:\n\n1. **Registers a custom import finder** in `sys.meta_path`\n2. **Transforms emoji identifiers** to valid Python names using AST manipulation\n3. **Maps emojis to modules** using a configurable dictionary\n4. **Maintains compatibility** with standard Python imports\n\n## \u26a0\ufe0f Limitations\n\n- Emoji support in Python is handled through transformation, not native support\n- Some IDEs may not provide autocomplete for emoji imports\n- Debugging may show transformed names instead of emojis\n- Not recommended for production code (but great for fun projects!)\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- Inspired by the playful nature of Python\n- Thanks to all contributors and emoji enthusiasts\n- Special thanks to the Python import system documentation\n\n## \ud83d\udcee Contact\n\n- GitHub: [@arpanghoshal](https://github.com/arpanghoshal)\n- PyPI: [emojify-python](https://pypi.org/project/emojify-python/)\n\n---\n\n**Remember**: While emoji imports are fun, use them responsibly! \ud83c\udf89\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Import Python modules using emojis \ud83d\udc0d",
"version": "1.1.1",
"project_urls": {
"Documentation": "https://github.com/arpanghoshal/emojify-python#readme",
"Homepage": "https://github.com/arpanghoshal/emojify-python",
"Issues": "https://github.com/arpanghoshal/emojify-python/issues",
"Repository": "https://github.com/arpanghoshal/emojify-python"
},
"split_keywords": [
"emoji",
" import",
" fun",
" python",
" programming",
" emojify"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "952d0e45c29a4a2842460ae6bf2432eb41fdf0e24a7f3bb43af7e4fc484344c7",
"md5": "726a3fbcc31249f84cb54b58ddbf992f",
"sha256": "4119494e46de364b48cba694d48f9361c2a8ccf6c14b51ae8319361f604effc3"
},
"downloads": -1,
"filename": "emojify_python-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "726a3fbcc31249f84cb54b58ddbf992f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 57446,
"upload_time": "2025-08-18T19:29:40",
"upload_time_iso_8601": "2025-08-18T19:29:40.176410Z",
"url": "https://files.pythonhosted.org/packages/95/2d/0e45c29a4a2842460ae6bf2432eb41fdf0e24a7f3bb43af7e4fc484344c7/emojify_python-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9d09caee2f17bb5b9ff70cf35b4db72608541d667b4766c1c68efbbbcfa9fb96",
"md5": "a8e2b6678a816f3bbeaf5ca5943229a9",
"sha256": "d0787cbe2f8161c8e07b5c85309869aa613c7b3345ae49cb1affab45d0287ca2"
},
"downloads": -1,
"filename": "emojify_python-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a8e2b6678a816f3bbeaf5ca5943229a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 69225,
"upload_time": "2025-08-18T19:29:41",
"upload_time_iso_8601": "2025-08-18T19:29:41.379029Z",
"url": "https://files.pythonhosted.org/packages/9d/09/caee2f17bb5b9ff70cf35b4db72608541d667b4766c1c68efbbbcfa9fb96/emojify_python-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-18 19:29:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "arpanghoshal",
"github_project": "emojify-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "emojify-python"
}