Skip to main content

Hash (unicode) strings to emoji(s). You can set the length.

Importing is as easy as from pymojihash import hash_to_emoji! hash_to_emoji() is the wonderful hashing function.

In this example a string is hashed to a single emoji:
>>> hash_to_emoji('lol')
'🇫🇲'
There is a limited number of emojis outputs (see: emojis.json in this package) so if you increase the hash_length the less likely youa re to encounter different values which produce the same output/hash/emoji(s):
>>> hash_to_emoji('lol', 4)
'◼️🍕🍐🇫🇲'
>>> hash_to_emoji('lol', 2)
'🍐🇫🇲'
>>> hash_to_emoji('heck', 2)
'♠️🇨🇦'
You can also exclude the flag emojis like this:
>>> hash_to_emoji('heck')
'🇨🇦'
>>> hash_to_emoji('heck', no_flags=True)
'😤'

Metadata

Release files for pymojihash 0.4.0

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

Source distribution (sdist)

Source distribution for pymojihash 0.4.0
File Size Uploaded Provenance Actions
pymojihash-0.4.0.tar.gz 5.9 kB Without provenance Details for pymojihash-0.4.0.tar.gz

Release files / pymojihash-0.4.0.tar.gz

Download URL pymojihash-0.4.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
af448fc715e477212e3ecf6c4c98cd017fcf9ae055e80dd31b66cc16fc29c960
BLAKE2b-256 checksum
How to use checksums
f811740bdc7227988ade758759ce5b590b4e00c73ccd504d66307046bd478a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pymojihash 0.4.0

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.

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