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 of 7 or less discards the datetime logic and just generates a random token.

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file ruid-0.1.1.tar.gz.

File metadata

  • Download URL: ruid-0.1.1.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

Hashes for ruid-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5b3628e0ecf129632b5c01dd9e61c57f217f384c79127b569e37183639b91d31
MD5 7c16dab1f2c4cab7b781b335a03d1f8a
BLAKE2b-256 b920b85c90d2ca9d1349f7fdffc14e250dbcf435f4901ee79a921c21dd8ba6ad

See more details on using hashes here.

File details

Details for the file ruid-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ruid-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ceeb58d05b5d709f5bc216631acd7de350b749612b3f315eb41bbe72f6a13222
MD5 333b88a4881ee396e2dac9fcde8dc174
BLAKE2b-256 5c2a351ffcd62fb6706230a3d1d5051b5042129c8d43b4e8e433b59eac1f6122

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