Generators
generate_random_id¶
Generates a random alphanumeric string (ASCII letters and digits) of the given length. Defaults to 7 characters.
| Parameter | Type | Default | Description |
|---|---|---|---|
chars |
int |
7 |
Length of the generated id |
Note
This is not cryptographically secure — it uses random.choices, not secrets. Don't use it for tokens, passwords, or anything security-sensitive.