Reasonably unique and readable identifier generator
Project description
Description
Generates reasonably unique (slim chance of duplicates) and readable (avoids characters that look similar) fixed width string identifiers. These identifiers are useful as API tokens, database record identifiers (primary keys, etc) among other things.
Installation
pip install ruid
or
poetry add ruid
Length considerations
The function uses current date and time to determine part of the random string. This has the advantage of ensuring fewer collisions at different timestamps but also means that a length of 6 would result in same token generated within the same second. A reasonable default length of 10 ensures more than 6 million tokens per second. Length below 6 is not supported.
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
File details
Details for the file ruid-0.1.0.tar.gz
.
File metadata
- Download URL: ruid-0.1.0.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.10.12 Linux/5.15.0-1041-nvidia
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e8904b864d5c174a8acd3c0cfb28f4e623bc3b38d80325c1be3e2a46eabac6d |
|
MD5 | 6ac74f98f192f855f96973cb95da04b8 |
|
BLAKE2b-256 | 2f0ccad2fc41b8b5f93ebc859957813e6493f57d75748d1e42866b7cc2b08a99 |
File details
Details for the file ruid-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ruid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.10.12 Linux/5.15.0-1041-nvidia
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd5f20409cb9fc53a6fddd76420d4d4e349bb80c2943a78127702908feb650dc |
|
MD5 | 09513ec90dc6b02cbc408e9895b76e07 |
|
BLAKE2b-256 | aab8e40da789f5761f15726e3804617aa986bff9057efe848ed654883a0ef965 |