uuid.UUID.variant

UUID.variant The UUID variant, which determines the internal layout of the UUID. This will be one of the integer constants RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE.

uuid.UUID.urn

UUID.urn The UUID as a URN as specified in RFC 4122.

uuid.UUID.int

UUID.int The UUID as a 128-bit integer.

uuid.UUID.hex

UUID.hex The UUID as a 32-character hexadecimal string.

uuid.UUID.fields

UUID.fields A tuple of the six integer fields of the UUID, which are also available as six individual attributes and two derived attributes: Field Meaning time_low the first 32 bits of the UUID time_mid the next 16 bits of the UUID time_hi_version the next 16 bits of the UUID clock_seq_hi_variant the next 8 bits of the UUID clock_seq_low the next 8 bits of the UUID node the last 48 bits of the UUID time the 60-bit timestamp clock_seq the 14-bit sequence number

uuid.UUID.bytes_le

UUID.bytes_le The UUID as a 16-byte string (with time_low, time_mid, and time_hi_version in little-endian byte order).

uuid.UUID.bytes

UUID.bytes The UUID as a 16-byte string (containing the six integer fields in big-endian byte order).

uuid.UUID

class uuid.UUID(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None) Create a UUID from either a string of 32 hexadecimal digits, a string of 16 bytes as the bytes argument, a string of 16 bytes in little-endian order as the bytes_le argument, a tuple of six integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version, 8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as the fields argument, or a single 128-bit integer as the int argument. When a string

uuid.getnode()

uuid.getnode() Get the hardware address as a 48-bit positive integer. The first time this runs, it may launch a separate program, which could be quite slow. If all attempts to obtain the hardware address fail, we choose a random 48-bit number with its eighth bit set to 1 as recommended in RFC 4122. “Hardware address” means the MAC address of a network interface, and on a machine with multiple network interfaces the MAC address of any one of them may be returned.

uu.Error

exception uu.Error Subclass of Exception, this can be raised by uu.decode() under various situations, such as described above, but also including a badly formatted header, or truncated input file.