Skip to content

spaceteams.uuid

Utility functions matching STPRO's C++ uuid::UUID_t object. Prefer using python uuid.uuid4 functions for typical use, unless it is critical that the results match the C++ functions.

FromString

FromString(arg0: str, arg1: bool) -> uuid.UUID

Parse UUID string. Assuming all hex alpha chars are lowercase

Generate

Generate() -> uuid.UUID

Randomly generate a version 4, variant 1 UUID.

IsValid

IsValid(arg0: UUID) -> bool

Validate UUID bytes (true if valid UUID)

IsValidStr

IsValidStr(arg0: str) -> bool

Validate UUID string (true if valid UUID) NOTE: This does not check proper version or anything other than proper formatting

MakeNull

MakeNull() -> uuid.UUID

PrintHex

PrintHex(arg0: UUID, arg1: SupportsInt, arg2: SupportsInt) -> str

Helper function to convert a set of UUID bytes to hexidecimal representation

to_string

to_string(arg0: UUID) -> str

C++-matching UUID to_string function.