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 of 7 or less discards the datetime logic and just generates a random token.
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
ruid-0.1.2.tar.gz
(1.5 kB
view details)
Built Distribution
ruid-0.1.2-py3-none-any.whl
(1.8 kB
view details)
File details
Details for the file ruid-0.1.2.tar.gz
.
File metadata
- Download URL: ruid-0.1.2.tar.gz
- Upload date:
- Size: 1.5 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 | a3492f5d7c18cf2330ada17d90ca041fa90e6698d232f69016e391637ad3300a |
|
MD5 | 839ba5d1b6d2878a6e611255782887c2 |
|
BLAKE2b-256 | c7643d10115b30acb793241b8aded3b1c6ec84226f47354dfc59e01b9949eb05 |
File details
Details for the file ruid-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ruid-0.1.2-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 | dfcbc1c33c8baa3194e473eb9d8d1cf6768bd9a214becc79a7d3901ffe13380c |
|
MD5 | dc137224591f66fc2d1d3f2695a4cd92 |
|
BLAKE2b-256 | 5d6df4a96196f1f31e70c5f12ecedb88d369c212e752fb44c1004081ab2c4e87 |