The misc.py module#

Summary#

short_uuid

Generate a short UUID.

Description#

Provides miscellaneous utility functions.

Module detail#

misc.short_uuid(nchars: int = 12) str#

Generate a short UUID.

Parameters:
ncharsint, default 12

Number of characters in the UUID. Only applies if nchars is greater than 6. Using the default, the probability of a collision is 1.23e-17 for 1 billion rounds. See https://shortunique.id/classes/ShortUniqueId.html#collisionProbability.