Metadata-Version: 2.1
Name: ruid
Version: 0.1.1
Summary: Reasonably unique and readable identifier generator
Home-page: https://github.com/kashifpk/arango-orm
Author: Kashif Iftikhar
Author-email: kashif@compulife.com.pk
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/kashifpk/arango-orm
Description-Content-Type: text/markdown

# 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

```shell
pip install ruid
```

or

```shell
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.


