Module
UUID utility functions for handling UUID version detection and conversion. This module provides utilities for detecting UUID7s and converting them to UUID4s to ensure compatibility with systems that expect UUID4 format.convert_uuid_if_uuid7
uuid_obj(Optional[Union[UUID, str]]): The UUID to potentially convert, either as a UUID object, string, or None.
Optional[UUID]: The converted UUID4 if input was UUID7, the original UUID object if not UUID7, or None if input was None.
is_uuid7
uuid_obj(Union[UUID, str]): The UUID to check, either as a UUID object or string.
bool: True if the UUID is version 7, False otherwise.
uuid7_to_uuid4
uuid_obj(Union[UUID, str]): The UUID7 to convert, either as a UUID object or string.
ValueError: If the input is not a valid UUID or not a UUID7.
UUID: A UUID4 generated from the hash of the input UUID7.