UUID

Instances of the UUID class represent UUIDs as specified in RFC 4122. Converting a UUID to a string using str() produces a string in the form "{12345678-1234-1234-1234-123456789abc}". The UUID constructor accepts a similar string (braces and hyphens optional), or six integer arguments (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and 48-bit values respectively). UUID objects have the following attributes:

bytes gets or sets the UUID as a 16-byte string

urn gets the UUID as a URN as specified in RFC 4122

variant gets or sets the UUID variant as one of the constants
RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE

version gets or sets the UUID version number (1 through 5)


Attributes

a bytes

<property object at 0x8d723ec>

a urn

<property object at 0x8d7266c>

a variant

<property object at 0x8d72694>

a version

<property object at 0x8d726bc>

Methods

f __init__(self, *args) ...

Create a UUID either from a string representation in hexadecimal or from six integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_ver, 8-bit clock_hi_res, 8-bit clock_low, 48-bit node).

f __cmp__(self, other) ...

f get_bytes(self) ...

f set_bytes(self, bytes) ...

f get_urn(self) ...

f get_variant(self) ...

f set_variant(self, variant) ...

f get_version(self) ...

f set_version(self, version) ...

See the source for more information.