library to convert uuids forth and back to a human-readable and pronounceable format
Project description
huuid - human UUIDs
python3-library to convert uuids forth and back to a human-readable and pronounceable format
What is huuid
hhuid does a bijective transformation from uuids to a format that can be read, pronounced and typed a lot better than the default formats.
No Information is lost in the mapping.
Here is an example-output of the demo.py in the tests-folder:
generated uuid: f3ad6cef-2732-4b18-97dd-137a459eb656
human-readable: tapratnaz-vorjonfif-Tezjozdin-sejgipneh
Afer back-translation: f3ad6cef-2732-4b18-97dd-137a459eb656
--- other usecases: ---
first 32bit human-readable: tapratnaz
generated 32bit-Password: Sunmuhnud
generated 64bit-Password: Vezvegdum-ladzibkal
How to use huuid
Install it using pip:
pip install huuid
or just put the folder huuid in your project-root. (Jep, just that one file - that's all!)
Then in python import it in your code with
import huuid
and convert any uuid-object or uuid-string to a huuid-string with
huuid.uuid2human(myUuidObject)
Optionally you can limit the huuid-string to the 32, 64 or 96 bit:
huuid.uuid2human(myUuidObject, 64)
Convert it back to a uuid-string with
huuid.human2uuid(myUuidObject)
Background
The hexadecimal representation of the UUID is translated to letters that have an unambiguous pronounciation. The 2nd, and then every third letter is a vowel, the other ones are consonants which makes up a well pronounced word that sounds like it is made up of syllables.
There are 5 vowels and 16 consonants (just unambiguous ones) being used, and (only) for the first letter capitals are allowed. (And a capital-C additional to the 16 chosen unambiguous consonants to reach 32bit with 9 letters)
With this pattern there are a little more than 2^32 possibilities to generate a word with 9 letters. 4 "Words" hit the 128bit of UUIDs (>10^38).
Dependencies
This only uses the python3-modules uuid and math.
Credits
This is highly inspired by
https://arxiv.org/html/0901.4016
published by Daniel Shawcross Wilkerson and its implementation:
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file huuid-0.9.0.tar.gz.
File metadata
- Download URL: huuid-0.9.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2fabd579da4ac2a731ce8e1eb05b66b1fa8ec2bdb2c598c5182bf93307a9b34
|
|
| MD5 |
2d9ec1d36101d1b1676ee109c5218dc0
|
|
| BLAKE2b-256 |
86e3bde1d1960afa914bf2539654cf541eb448e384e27709aa12495fb69491d8
|
Provenance
The following attestation bundles were made for huuid-0.9.0.tar.gz:
Publisher:
workflow.yml on polarwinkel/huuid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
huuid-0.9.0.tar.gz -
Subject digest:
d2fabd579da4ac2a731ce8e1eb05b66b1fa8ec2bdb2c598c5182bf93307a9b34 - Sigstore transparency entry: 165994831
- Sigstore integration time:
-
Permalink:
polarwinkel/huuid@304ac86e6daba97c6fa979906dc668945eabf331 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/polarwinkel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@304ac86e6daba97c6fa979906dc668945eabf331 -
Trigger Event:
push
-
Statement type:
File details
Details for the file huuid-0.9.0-py3-none-any.whl.
File metadata
- Download URL: huuid-0.9.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5af7eb8cb037efe542faace443d1584647ea58ccada1bde88b792f25635fdb0
|
|
| MD5 |
7424e06298053e0d1afb7d648fdc9a61
|
|
| BLAKE2b-256 |
cb82e9f6ec386eb644edd99beee6db4a2e13d47eede2c653df1cf2ea42a7fb61
|
Provenance
The following attestation bundles were made for huuid-0.9.0-py3-none-any.whl:
Publisher:
workflow.yml on polarwinkel/huuid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
huuid-0.9.0-py3-none-any.whl -
Subject digest:
f5af7eb8cb037efe542faace443d1584647ea58ccada1bde88b792f25635fdb0 - Sigstore transparency entry: 165994841
- Sigstore integration time:
-
Permalink:
polarwinkel/huuid@304ac86e6daba97c6fa979906dc668945eabf331 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/polarwinkel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@304ac86e6daba97c6fa979906dc668945eabf331 -
Trigger Event:
push
-
Statement type: