On this page
uuid.uuid6
Prev: uuid.uuid5 | Up: uuid | Next: uuid.uuid7
Rel: uuid.bytes_, uuid.Enum, uuid.getnode, uuid.int_
Ref: docs.python.org — uuid.uuid6
Tags: #public #python3 #stdlib #uuid
Import
import uuid
from uuid import uuid6
Signature & Overview
uuid.uuid6(node=None, clock_seq=None)
Similar to :func:uuid1 but where fields are ordered differently for improved DB locality.
Usage
import uuid
if hasattr(uuid, 'uuid6'):
assert uuid.uuid6().version == 6
Gotchas
- Requires Python 3.14+ (RFC 9562): Field-compatible time-ordered reorder of UUIDv1 (prefer
uuid7()for new systems).
REPL Inspect
from uuid import uuid6
help(uuid6)
Linked from
Related notes
- tuts/python3/stdlib_module/uuid/uuid5 Linked here; links to this page; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/uuid7 Linked here; links to this page; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/bytes_ Linked here; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/Enum Linked here; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/getnode Linked here; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/int_ Linked here; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/UUID Linked here; shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/uuid/main shared tags: #stdlib, #uuid
- tuts/python3/stdlib_module/uuid/SafeUUID shared tags: #stdlib, #uuid