python uuid-lib
Python library written in rust that lets you use uuid1..8 funcs.
Available functions
uuid1 - Generated based on a timestamp, a unique node identifier (typically a MAC address), and a random component.
uuid2 - Similar to UUID1 but includes a group or user identifier, making it less popular and rarely used.
uuid3 - Generated using the MD5 hash function based on a namespace and a unique string (e.g., a URL).
uuid4 - A fully random UUID, potentially using cryptographically secure random number generators.
uuid5 - Similar to UUID3 but uses SHA-1 instead of MD5 for hashing unique data and the namespace.
uuid6 - A modified version of UUID1 with the timestamp in sequential order, improving database indexing performance.
uuid7 - Generated based on a timestamp using Unix Epoch format and random bits to ensure uniqueness.
uuid8 - Reserved for custom UUIDs with arbitrary generation schemes, leaving implementation details open. Accepts any UUID as bytes (If UUID generated by this lib, use object.bytes proprety)
Installation
Install uuid-lib with pip:
pip install uuid-lib
Install uuid-lib with poetry:
poetry install uuid-lib
Usage/Examples
...
from uuid_lib import uuid4, uuid7, uuid8(), ...
user_id = uuid7()
some_id = uuid8(user_id.bytes)
some_id = uuid8(uuid4().bytes)