Skip to main content

Support for emoji digits in Python

Project description

Emojit

This package aims to address a long-standing Python issue:

int("1️⃣") != 1

Usage

from emojit import emj

emoji_str = emj("4️⃣0️⃣2️⃣")

assert isinstance(emoji_str, str) is True
assert int(emoji_str) == 402

Please, don't actually use it.

Advanced usage

Underscores as visual separators

from emojit import emj

assert int(emj("4️⃣0️⃣2️⃣_0️⃣0️⃣0️⃣")) == 402_000

Shorthand emojis

from emojit import emj

assert int(emj("🔟")) == int(emj("1️⃣0️⃣"))
assert int(emj("💯")) == int(emj("1️⃣0️⃣0️⃣"))

Support

This package is considered feature complete. It will be archived once the functionality is upstreamed into Python standard library.

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

emojit-0.1.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

emojit-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file emojit-0.1.1.tar.gz.

File metadata

  • Download URL: emojit-0.1.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/24.0.0

File hashes

Hashes for emojit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4ea19f0b8679a238b0ba9e107fabe619f53cd8939cc273941060c13bce76ce67
MD5 0b767b14a169997db75c114be02d524d
BLAKE2b-256 e34a7fc01518d0b512713beb3566413c8801142a57844245992d5730574f4420

See more details on using hashes here.

File details

Details for the file emojit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: emojit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/24.0.0

File hashes

Hashes for emojit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 272d335ba3685fb660c5f26a8f60d3eb9c0c0d00722d79d0b1c889a348fbab11
MD5 b2810d63ca3028933b09cb65f9807fd9
BLAKE2b-256 1074904af542a026863a1bde8ae8783a5942c4e3795556bff2a20a7625870018

See more details on using hashes here.

Supported by

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