Logo Search packages:      
Sourcecode: ubufox version File versions

uuid::UUID Class Reference

List of all members.


Detailed Description

Instances of the UUID class represent UUIDs as specified in RFC 4122.
UUID objects are immutable, hashable, and usable as dictionary keys.
Converting a UUID to a string with str() yields something in the form
'12345678-1234-1234-1234-123456789abc'.  The UUID constructor accepts
five possible forms: a similar string of hexadecimal digits, or a tuple
of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
48-bit values respectively) as an argument named 'fields', or a string
of 16 bytes (with all the integer fields in big-endian order) as an
argument named 'bytes', or a string of 16 bytes (with the first three
fields in little-endian order) as an argument named 'bytes_le', or a
single 128-bit integer as an argument named 'int'.

UUIDs have these read-only attributes:

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

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

    fields      a tuple of the six integer fields of the UUID,
                which are also available as six individual attributes
                and two derived attributes:

        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

    hex         the UUID as a 32-character hexadecimal string

    int         the UUID as a 128-bit integer

    urn         the UUID as a URN as specified in RFC 4122

    variant     the UUID variant (one of the constants RESERVED_NCS,
                RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)

    version     the UUID version number (1 through 5, meaningful only
                when the variant is RFC_4122)

Definition at line 53 of file uuid.py.


Public Member Functions

def __cmp__
def __hash__
def __init__
def __int__
def __repr__
def __setattr__
def __str__
def get_bytes
def get_bytes_le
def get_clock_seq
def get_clock_seq_hi_variant
def get_clock_seq_low
def get_fields
def get_hex
def get_node
def get_time
def get_time_hi_version
def get_time_low
def get_time_mid
def get_urn
def get_variant
def get_version

Public Attributes

 variant

Static Public Attributes

tuple bytes = property(get_bytes)
tuple bytes_le = property(get_bytes_le)
tuple clock_seq = property(get_clock_seq)
tuple clock_seq_hi_variant = property(get_clock_seq_hi_variant)
tuple clock_seq_low = property(get_clock_seq_low)
tuple fields = property(get_fields)
tuple hex = property(get_hex)
tuple node = property(get_node)
tuple time = property(get_time)
tuple time_hi_version = property(get_time_hi_version)
tuple time_low = property(get_time_low)
tuple time_mid = property(get_time_mid)
tuple urn = property(get_urn)
tuple variant = property(get_variant)
tuple version = property(get_version)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index