picop.uuid#
Fast C-backed UUID values and version 4 generation.
- class picop.uuid.UUID#
Bases:
UUIDStdlib-compatible UUID built from canonical text or 16 bytes in C.
Notes
Field layout,
str/hex/urnformatting, and comparisons matchuuid.UUID. Construction accepts a hyphenated/ canonical string or exactly 16 bytes; invalid input raisesValueError.- int#
Return the 128-bit integer value of the UUID.
- is_safe#
Return multiprocessing safety as
uuid.SafeUUID.
- __eq__(other)#
Return self==value.
- __format__(format_spec)#
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
- __ge__(other)#
Return self>=value.
- __gt__(other)#
Return self>value.
- __le__(other)#
Return self<=value.
- __lt__(other)#
Return self<value.
- __ne__(other)#
Return self!=value.
- __reduce__()#
Helper for pickle.
- __repr__()#
Return repr(self).
- __str__()#
Return str(self).
- property bytes#
Return the 16-byte big-endian binary representation.
- property bytes_le#
Return the 16-byte little-endian binary representation.
- property clock_seq#
Return the 14-bit clock sequence field.
- property clock_seq_hi_variant#
Return the
clock_seq_hi_and_reservedfield (8 bits).
- property clock_seq_low#
Return the
clock_seq_lowfield (8 bits).
- property fields#
Return the six RFC 4122 integer fields as a tuple.
- property hex#
Return the 32-character hexadecimal form without hyphens.
- property node#
Return the 48-bit node (MAC) field.
- property time#
Return the 60-bit timestamp field when applicable.
- property time_hi_version#
Return the
time_hi_and_versionfield (16 bits).
- property time_low#
Return the
time_lowfield (32 bits).
- property time_mid#
Return the
time_midfield (16 bits).
- property urn#
Return the RFC 4122
urn:uuid:…form.
- property variant#
Return the UUID variant name string (e.g.
specified in RFC 4122).
- property version#
Return the UUID version number, or
Noneif not RFC 4122.