uuid7
UUID version 7, generating time-sorted UUIDs with 200ns time resolution and 48 bits of randomness
Decision gist · record as of 2026-08-14
Yes, if you need time-sortable UUIDs and can accept a dormant package (no updates since 2021-12-29). The implementation is simple, dependency-free, and MIT-licensed. However, verify that RFC4122 version 7 adoption aligns with your infrastructure's UUID support before committing to it as a primary identifier scheme.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No runtime dependencies and a pure-Python wheel distribution make installation straightforward.
- The package is dormant (last release 2021-12-29, last commit 2025-02-10) but the repository remains active and unarchived.
License · maintenance · safety
MIT license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2021-12-29 (1689 days) · last repo commit 2025-02-10 · 132 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 14,610,259 downloads/mo, #1,223 on PyPI
Alternatives
Verify before relying
pip install uuid7
from uuid7 import uuid7
# Generate a time-sortable UUID
my_uuid = uuid7()
print(my_uuid) # UUID('061cb26a-54b8-7a52-8000-2124e7041024')- Whether the 50ns time resolution claim and the 200ns resolution in the summary are equivalent or represent different measurement contexts.
- Current adoption rate and real-world production use beyond the top-5000 download tier.
- Whether draft-peabody-dispatch-new-uuid-format-02 has progressed to RFC status since the package's 2021 release.
- Import path: whether uuid7() is imported directly from uuid7 or from a submodule.
What it is and what it does
uuid7 implements version 7 UUIDs as proposed in draft-peabody-dispatch-new-uuid-format-02, which encode a Unix timestamp in the first 36 bits followed by fractional seconds, a sequential counter, and random bits. Unlike standard UUIDs, version 7 UUIDs sort chronologically by their creation time, making them useful for databases and systems where insertion order matters. The package provides multiple output formats (bytes, hex, int, str, uuid, or None).
The implementation allocates the 128 bits as: 36 bits of whole seconds since epoch, 24 bits of fractional seconds (approximately 50ns resolution), 14 bits of sequential counter for repeated calls within the same time tick, and 48 bits of randomness, plus RFC4122-mandated version and variant bits. Generation is faster than uuid.uuid4() when returning integers or strings, though slightly slower when returning UUID objects.
Use it for
- Database primary keys where insertion order and time-based sorting are both required without a separate timestamp column.
- Distributed system event IDs that need to be both globally unique and chronologically orderable across nodes.
- Time-series data collection where UUID generation order reflects actual event timing.
- Log entry identifiers that can be sorted by creation time without parsing metadata.
- Microservice request tracing where trace IDs encode their generation timestamp for quick temporal analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need time-sortable UUIDs and can accept a dormant package (no updates since 2021-12-29).
The implementation is simple, dependency-free, and MIT-licensed. However, verify that RFC4122 version 7 adoption aligns with your infrastructure's UUID support before committing to it as a primary identifier scheme.
Install
uuid7 on PyPI
Before you install
No runtime dependencies and a pure-Python wheel distribution make installation straightforward. The package is dormant (last release 2021-12-29, last commit 2025-02-10) but the repository remains active and unarchived.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install uuid7
from uuid7 import uuid7
# Generate a time-sortable UUID
my_uuid = uuid7()
print(my_uuid) # UUID('061cb26a-54b8-7a52-8000-2124e7041024')
Verify before relying
- Whether the 50ns time resolution claim and the 200ns resolution in the summary are equivalent or represent different measurement contexts.
- Current adoption rate and real-world production use beyond the top-5000 download tier.
- Whether draft-peabody-dispatch-new-uuid-format-02 has progressed to RFC status since the package's 2021 release.
- Import path: whether uuid7() is imported directly from uuid7 or from a submodule.
Package facts
| License | MIT license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,689 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,610,259 / month, #1,223 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: uuid7-0.1.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “time-sortable UUID generation”
- uuid7Generates version 7 UUIDs that are time-sortable with chronological…
- typeid-pythonGenerates and parses TypeIDs—type-safe, sortable identifiers based on…
- fastuuidFastUUID provides CPython bindings to Rust's UUID library, offering…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also uuid-extension · timeflake · uuid · uuid6 · uuid-utils · uuid7-standard · uuid-v7 · ulid · c_uuid_v7 · freeze-uuid