UUID version 7 (Pre-RFC Standard)

0.1.0 · abandoned · verified Thu Apr 09

This library implements UUID version 7 based on an *earlier draft* of the specification, offering time-sorted UUIDs with approximately 50ns resolution. Released at version 0.1.0 in late 2021, it appears to be unmaintained. Crucially, it **does NOT conform to the final RFC 9562 standard for UUIDv7**, which specifies millisecond precision, leading to significant compatibility issues with compliant implementations.

Warnings

Install

Imports

Quickstart

Generates a new UUID using the `uuid7` library. Note that UUIDs generated by this library are not compliant with the final RFC 9562 standard.

from uuid7 import uuid7

# Generate a new non-RFC 9562 compliant UUIDv7
my_uuid = uuid7()
print(f"Generated UUID: {my_uuid}")
print(f"UUID as string: {str(my_uuid)}")
print(f"UUID as integer: {my_uuid.int}")

view raw JSON →