Skip to main content

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


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.0.tar.gz (1.4 kB view details)

Uploaded Source

Built Distribution

ruid-0.1.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

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

Hashes for ruid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e8904b864d5c174a8acd3c0cfb28f4e623bc3b38d80325c1be3e2a46eabac6d
MD5 6ac74f98f192f855f96973cb95da04b8
BLAKE2b-256 2f0ccad2fc41b8b5f93ebc859957813e6493f57d75748d1e42866b7cc2b08a99

See more details on using hashes here.

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

Hashes for ruid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd5f20409cb9fc53a6fddd76420d4d4e349bb80c2943a78127702908feb650dc
MD5 09513ec90dc6b02cbc408e9895b76e07
BLAKE2b-256 aab8e40da789f5761f15726e3804617aa986bff9057efe848ed654883a0ef965

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page