Skip to content

classes

UUIDLength dataclass

Simple dataclass to store UUID string lengths.

When setting the length of a string, you can use something like UUID().standard to pass these pre-defined values.


standard (int): The number of characters expected in a standard UUID string
hex (int): The number of characters expeceted in a UUID hex string
Source code in src/red_utils/std/uuid_utils/classes.py
@dataclass
class UUIDLength:
    """Simple dataclass to store UUID string lengths.

    When setting the length of a string, you can use something like UUID().standard to pass these pre-defined values.

    Args:
    ----
        standard (int): The number of characters expected in a standard UUID string
        hex (int): The number of characters expeceted in a UUID hex string

    """

    standard: int = 36
    hex: int = 32