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 this.

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 the 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-1.0.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: emojit-1.0.2.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-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3b7fb259e123ec8ce652dff75470a5679d6ec244e95f65af0ab2a464aefaef22
MD5 ebf31f74ef69043749fa6a57e6ab9190
BLAKE2b-256 11454b8585b79601f33b4cf2f0d02c8db73aa389f93f5c260f88e44f6857d461

See more details on using hashes here.

File details

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

File metadata

  • Download URL: emojit-1.0.2-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-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9821002246ce429ee2404e55b3cc441ba89e668eabd4401bd513c33666fc6fe
MD5 0e88c6ab01a04c49805ef61837c960ba
BLAKE2b-256 565b5612319c5992b75e50ed7b7d2ed89c5ae83c87fc5fcfdc7e9b7783b56c75

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