The uuid6 library provides new time-based UUID formats (v6, v7, v8) that are optimized for use as database keys, offering better performance and sequential ordering than traditional UUIDv1. As of version 2025.0.0, the project transitioned from Calendar Versioning (YYYY.MM.DD) to Semantic Versioning (MAJOR.MINOR.PATCH) and maintains a frequent release cadence.
pip install uuid6Verified import paths — ran on the pinned version, not inferred.
Generates a UUIDv6 and UUIDv7, demonstrating basic usage and object instantiation.
Update dependency declarations to align with semantic versioning (e.g., `~=2025.0` or `>=2025.0.0,<2026.0.0`).
Upgrade your Python environment to 3.9 or newer.
If nanosecond granularity or previous `uuid7()` behavior is required, consider implementing a custom UUIDv8 scheme or using alternative methods. The current `uuid7()` is suitable for most database key use cases.
Refer to the library's documentation and RFC 9562 for proper `uuid8()` implementation for custom requirements.
pip install uuid6
Install the `uuid6` library and import its functions directly: `import uuid6` and then call `uuid6.uuid6()`.
Call `uuid6.uuid6()` without any arguments. If you intend to specify a timestamp or other parameters, use specific functions like `uuid6.uuid6_from_timestamp()`.
Import the specific UUID generation function you need, for example: `from uuid6 import uuid6`.
No dependency data recorded yet.