Giter Site home page Giter Site logo

cuteuid's Introduction

CuteUID

Generate cute UIDs, i.e. unique(ish) identifiers that are similar in appearance to UUIDs.

Install

pip install cuteuid

View on PyPi via https://pypi.org/project/cuteuid/

Usage

from cuteuid import generate_cuteuid

generate_cuteuid()                  # 1337 UID
# 3xampl3a-boy1-goa1-5ucc33dd3p7h
# d1v151on-5ho3-1w31-d1571ngu15ha
# 7ak351h3-k33p-175a-5ympa7h371c1

generate_cuteuid(hex_only=True)     # 1337 UID (hex only)
# 10adca9a-4057-5a13-901171ca1136
# 0ff1c1a1-50f7-f33d-43517a73b3d1
# ad01053a-9057-7311-c411d400da50

generate_cuteuid(emoji=True)        # EmojiUID
# ⛹‍♂️🧜‍♂️⬜️3️⃣📏🧹🤴🗾➖🇵🇰📔💹🌳➖🇮🇴🐅🛂🇹🇱➖🇧🇱🗾🕣💿👱‍♀️💞❗️👷🇸🇪🤤🏄‍♂️🍲
# 🏅🧫🏋‍♂️🇹🇱👫🇦🇱🇹🇩🇪🇺➖😚🤽‍♂️👂💮➖👩‍🔬😨👭🇦🇩➖🦏🔷🇵🇦🎁😓🥗🥵🤾‍♀️🧗‍♀️😽🛵🗺
# 👅🏧🙅‍♂️🚇📘🚕👭⛹️‍♀️➖🤽‍♀️🕵️‍♂️🏌‍♀️🦘➖🏄‍♂️👨‍💻🈴🎗➖💕💂‍♂️🏳️🧐😥🇬🇳💀🤕🔻🙆🍟🇵🇼

generate_cuteuid(                   # EmojiUID (flags only)
    emoji=True,
    flags_only=True
)
# 🇱🇧🇼🇸🇮🇹🇲🇳🇬🇹🇦🇲🇬🇶🇬🇾➖🇸🇧🇲🇺🇧🇬🇸🇱➖🇮🇸🏁🇪🇺🇱🇻➖🇿🇲🏴󠁧󠁢󠁳󠁣󠁴󠁿🇸🇸🇵🇲🇬🇶🇧🇬🇳🇮🇲🇰🇿🇼🇸🇭🇬🇶🇮🇴
# 🇱🇮🇮🇸🇼🇫🇹🇩🇵🇫🚩🇧🇫🇬🇶➖🇨🇰🇲🇪🇫🇯🇿🇦➖🇬🇱🇹🇬🇶🇦🇳🇨➖🇿🇼🇲🇬🇸🇮🇬🇭🇺🇬🇧🇦🏴󠁧󠁢󠁥󠁮󠁧󠁿🇹🇹🇻🇺🇳🇴🇧🇶🇹🇻
# 🇲🇦🇬🇶🇧🇱🏴󠁧󠁢󠁳󠁣󠁴󠁿🇹🇻🇱🇷🇻🇳🇲🇾➖🇪🇬🇸🇦🇧🇫🇨🇺➖🇨🇻🇻🇨🇺🇿🇫🇷➖🇹🇩🇲🇷🇸🇰🏴‍☠️🇷🇸🎌🇰🇪🇹🇲🇨🇲🇨🇴🇬🇸🏁

generate_cuteuid(                   # EmojiUID (smileys only)
    emoji=True,
    smileys_only=True
)
# 😇😠😲😢😚😐😝😌➖🙁🤮😣🙁➖🥰😑🤡🤥➖🙁😞😐🤢🤢🤬😂😒🤢😚😰😍
# 😥🤫😨🤢😔😧😩😶➖😰😙🥴😄➖😑😨😲🥴➖😰😲🥳😭🙁😟😚😀😶🤠🤥😄
# 😬🤢🤓🤠🤢😥😪😑➖🥴🙄😠😢➖🙃😆😊🤥➖🤯😒😢🥶😨😌😧🙁😮😣🤭😔

Preprocess

To rerun 1337 text preprocesing (translating word list into 1337 and hex 1337), update preprocess.py to point WORDLIST_URL to a URL containing a valid JSON list of words and run:

make preprocess

Disclaimer

This project is intended for entertainment purposes only - it is not recommended for use in your production or intended as a replacement to existing UUID generation mechanisms. It might be a fun thing to include in your non-mission critical personal project(s), provided you're the right kind of weird.

License

The MIT License (MIT)

Copyright (c) 2019 Alex Redmon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cuteuid's People

Contributors

alexdredmon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.