(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 _generate_time_safe is not None and node is clock_seq is None:
        uuid_time, safely_generated = _generate_time_safe()
        try:
            is_safe = SafeUUID(safely_generated)
        except ValueError:
            is_safe = SafeUUID.unknown
        return UUID(bytes=uuid_time, is_safe=is_safe)

    global _last_timestamp
    import time
    nanoseconds = time.time_ns()
    # 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 = 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.getrandbits(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 _generate_time_safe is not None and node is clock_seq is None : uuid_time , safely_generated = _generate_time_safe ( ) try : is_safe = SafeUUID ( safely_generated ) except ValueError : is_safe = SafeUUID . unknown return UUID ( bytes = uuid_time , is_safe = is_safe ) global _last_timestamp import time nanoseconds = time . time_ns ( ) # 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 = 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 . getrandbits ( 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 )