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.