Skip to main content

๐Ÿ - Write Python with Emojis

Write Python code using emojis ๐Ÿ

Example of running ๐Ÿ

Inspiration

Marc Garcia gave a wonderful lightning talk at EuroSciPy 2018 in Trento, where he pointed out some obvious deficiencies in Python's handling of unicode. For instance, code like the following is not supported:

import pandas as ๐Ÿผ

Installation

๐Ÿ is available on PyPI. Install it with pip:

python -m pip install pythonji

Using ๐Ÿ

๐Ÿ installs as pythonji. ๐Ÿ code files have the suffix .๐Ÿ. You can run a ๐Ÿ code file as follows:

pythonji file.๐Ÿ

Example

Save the following code to the file ๐Ÿผ.๐Ÿ:

import pandas as ๐Ÿผ
from numpy import random as ๐Ÿ”€

# Define a dataframe and print it to the console
๐Ÿ“‹ = ๐Ÿผ.DataFrame(
    {
        "๐Ÿ˜€": ["๐Ÿผ", "๐Ÿ", "๐Ÿฆ"],
        "๐Ÿท๏ธ": ["Panda", "Python", "Lion"],
        "๐Ÿ’ฏ": ๐Ÿ”€.randint(2, 5, size=3),
    },
).set_index("๐Ÿ˜€")
print(๐Ÿ“‹)

# Do some arithmetic with the dataframe
๐Ÿ”ค = f" Pythonji {' '.join(๐Ÿ“‹.index)}"
๐Ÿ”ข = ๐Ÿ“‹.loc["๐Ÿ", "๐Ÿ’ฏ"] + ๐Ÿ“‹.loc["๐Ÿผ", "๐Ÿ’ฏ"]
print(๐Ÿ”ค * ๐Ÿ”ข)

You can run the code as follows:

$ pythonji ๐Ÿผ.๐Ÿ 
        ๐Ÿท  ๐Ÿ’ฏ
๐Ÿ˜€           
๐Ÿผ   Panda  2
๐Ÿ  Python  2
๐Ÿฆ    Lion  4
 Pythonji ๐Ÿผ ๐Ÿ ๐Ÿฆ Pythonji ๐Ÿผ ๐Ÿ ๐Ÿฆ Pythonji ๐Ÿผ ๐Ÿ ๐Ÿฆ Pythonji ๐Ÿผ ๐Ÿ ๐Ÿฆ

Limitations

  • ๐Ÿ currently only handles single script files. It can import any regular Python module, but unfortunately not ๐Ÿ modules.
  • Sadly, pip does not currently handle unicode command names. Ideally, we want the executable to be named ๐Ÿ instead of pythonji.
  • Black unfortunately can not handle ๐Ÿ code. Does anybody want to contribute to โฌ›, a formatter for ๐Ÿ?

Metadata

Release files for pythonji-2 0.1.2

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

Source distribution (sdist)

Source distribution for pythonji-2 0.1.2
File Size Uploaded Provenance Actions
pythonji_2-0.1.2.tar.gz 4.0 kB Without provenance Details for pythonji_2-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pythonji-2 0.1.2
File Interpreter ABI Platform Actions
pythonji_2-0.1.2-py3-none-any.whl Python 3 none any Details for pythonji_2-0.1.2-py3-none-any.whl

Total release size: 8.3 kB

Release files / pythonji_2-0.1.2.tar.gz

Download URL pythonji_2-0.1.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f8ddf28712941e8401a29885a9fab2c0cbeeebe0ceb57f21cedfecfdfdb5ee08
BLAKE2b-256 checksum
How to use checksums
4a58b9320e19e641b3edcffecf147b42d51c5bbbfde8b03e85849d7dec9d5ab4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pythonji_2-0.1.2-py3-none-any.whl

Download URL pythonji_2-0.1.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bcb680cee5a18cb9a51024ad3c4ccff06abc02a6d4a155c7ec86088a7f2bcad
BLAKE2b-256 checksum
How to use checksums
999312bf39da4ad51390f431b73ea3d25a1c9ace4757c6ad0b0f66bf89333753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for pythonji-2 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

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