Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pymojihash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pymojihash

Python 3 package for hashing strings to emojis.

  • 0.4.0
  • PyPI
  • Socket score

Maintainers
1

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) '😤'

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc