(node=None, clock_seq=None)
return UUID(fields=(time_low, time_mid, time_hi_version,
                        clock_seq_hi_variant, clock_seq_low, node), version=1)
Generate a UUID from a host ID, sequence number, and the current time.
    If 'node' is not given, getnode() is used to obtain the hardware
    address.  If 'clock_seq' is given, it is used as the sequence number;
    otherwise a random 14-bit sequence number is chosen.
Generate a UUID from a host ID, sequence number, and the current time.
    If 'node' is not given, getnode() is used to obtain the hardware
    address.  If 'clock_seq' is given, it is used as the sequence number;
    otherwise a random 14-bit sequence number is chosen.
Generate a UUID from a host ID sequence number and the current time . If node is not given getnode () is used to obtain the hardware address . If clock_seq is given it is used as the sequence number ; otherwise a random 14 - bit sequence number is chosen .
def uuid1(node=None, clock_seq=None):
    """Generate a UUID from a host ID, sequence number, and the current time.
    If 'node' is not given, getnode() is used to obtain the hardware
    address.  If 'clock_seq' is given, it is used as the sequence number;
    otherwise a random 14-bit sequence number is chosen."""

    # When the system provides a version-1 UUID generator, use it (but don't
    # use UuidCreate here because its UUIDs don't conform to RFC 4122).
    if _uuid_generate_time and node is clock_seq is None:
        _buffer = ctypes.create_string_buffer(16)
        _uuid_generate_time(_buffer)
        return UUID(bytes=bytes_(_buffer.raw))

    global _last_timestamp
    import time
    nanoseconds = int(time.time() * 1e9)
    # 0x01b21dd213814000 is the number of 100-ns intervals between the
    # UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
    timestamp = int(nanoseconds/100) + 0x01b21dd213814000
    if _last_timestamp is not None and timestamp <= _last_timestamp:
        timestamp = _last_timestamp + 1
    _last_timestamp = timestamp
    if clock_seq is None:
        import random
        clock_seq = random.randrange(1<<14) # instead of stable storage
    time_low = timestamp & 0xffffffff
    time_mid = (timestamp >> 32) & 0xffff
    time_hi_version = (timestamp >> 48) & 0x0fff
    clock_seq_low = clock_seq & 0xff
    clock_seq_hi_variant = (clock_seq >> 8) & 0x3f
    if node is None:
        node = getnode()
    return UUID(fields=(time_low, time_mid, time_hi_version,
                        clock_seq_hi_variant, clock_seq_low, node), version=1)
def uuid1 ( node = None , clock_seq = None ) : # When the system provides a version-1 UUID generator, use it (but don't # use UuidCreate here because its UUIDs don't conform to RFC 4122). if _uuid_generate_time and node is clock_seq is None : _buffer = ctypes . create_string_buffer ( 16 ) _uuid_generate_time ( _buffer ) return UUID ( bytes = bytes_ ( _buffer . raw ) ) global _last_timestamp import time nanoseconds = int ( time . time ( ) * 1e9 ) # 0x01b21dd213814000 is the number of 100-ns intervals between the # UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00. timestamp = int ( nanoseconds / 100 ) + 0x01b21dd213814000 if _last_timestamp is not None and timestamp <= _last_timestamp : timestamp = _last_timestamp + 1 _last_timestamp = timestamp if clock_seq is None : import random clock_seq = random . randrange ( 1 << 14 ) # instead of stable storage time_low = timestamp & 0xffffffff time_mid = ( timestamp >> 32 ) & 0xffff time_hi_version = ( timestamp >> 48 ) & 0x0fff clock_seq_low = clock_seq & 0xff clock_seq_hi_variant = ( clock_seq >> 8 ) & 0x3f if node is None : node = getnode ( ) return UUID ( fields = ( time_low , time_mid , time_hi_version , clock_seq_hi_variant , clock_seq_low , node ) , version = 1 )