Python 3 package for hashing strings to emojis.
Project description
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) '♠️🇨🇦'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymojihash-0.3.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for pymojihash-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9e82f9a76a3c539eeb3556069a19d3d21425cf0df5ec4d65f7a330c2e0274e |
|
MD5 | a476cac0335e3d03fbe84c9e04f11666 |
|
BLAKE2b-256 | 60f2d0f0675f3ba00f45cea698ec1daf311cef3d83d397ab06afcb5f8c563e57 |