skillfed

c_uuid_v7

Fast UUID v7 generator implemented as a CPython C extension

c-uuid-v7 v0.0.11 74.8K downloads/30d#14,793 on PyPI
Permissive license Unlicense Active released

What it is and what it does

c_uuid_v7 is a Python binding to a C implementation of UUID version 7 generation. UUID v7 is a time-based, sortable identifier format that combines a timestamp with random bits, making it useful for distributed systems and databases where ordering by creation time is valuable. The package provides two interfaces: a fast native mode that returns custom UUID objects, and a compatibility mode that returns standard library uuid.UUID instances (with a performance trade-off) for use in frameworks that expect stdlib types.

The package is implemented as a CPython C extension, which means it compiles to machine code and runs faster than pure-Python alternatives. It supports Python 3.10 through 3.14 and PyPy 3.11, with prebuilt wheels for Linux (multiple architectures), Windows, and macOS, reducing installation friction for most users.

Use it for:

  • Generate sortable identifiers for database records in applications where insertion order matters.
  • Replace standard UUID generation in ORMs or frameworks that require stdlib uuid.UUID instances but benefit from v7's time-ordering.
  • Build distributed systems where multiple services generate IDs independently and need them naturally ordered by creation time.
  • High-throughput services that generate many UUIDs per second and need better performance than the standard library.
  • Microservices architectures using UUID v7 for correlation IDs or request tracing where performance is critical.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates UUID v7 identifiers via a CPython C extension, offering faster performance than Python's standard library uuid module.

Yes, if you need UUID v7 generation and performance matters. The compiled C extension offers faster execution than pure-Python alternatives, installation is straightforward on common platforms via prebuilt wheels, and the permissive Unlicense poses no legal friction. Install with caution only if you're on an uncommon architecture or Python version outside the 3.10–3.14 range, where you may need to build from source.

Install

c-uuid-v7 on PyPI

pip

pip install c-uuid-v7

uv

uv add c-uuid-v7

poetry

poetry add c-uuid-v7

Installing c_uuid_v7

Before you install

Medium install friction due to compiled C extension wheels; however, prebuilt wheels cover common architectures (x86_64, aarch64, armv7l, ppc64le, s390x, riscv64, Windows, macOS) and Python versions 3.10–3.14 plus PyPy 3.11, reducing build-from-source scenarios. Package is actively maintained.

License in practice

Released under the Unlicense, a permissive public-domain-equivalent license with no restrictions on use, modification, or distribution.

Quickstart

pip install c_uuid_v7

import c_uuid_v7
print(c_uuid_v7.uuid7())  # generates a UUID v7

# For stdlib uuid.UUID compatibility:
import c_uuid_v7.compat as uuid
print(uuid.uuid7())  # returns stdlib uuid.UUID instance

Requires Python 3.10 or later; compiled wheels available for most platforms, but some architectures may require a C compiler.

Verify before relying

  • Whether the performance advantage over stdlib uuid and other UUID v7 libraries justifies the compiled dependency.
  • Whether PyPy 3.11 support is complete and performant relative to CPython versions.
  • Real-world performance gains in typical application scenarios.

Package facts

License Unlicense (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 109 days since the last release
First released
Downloads 74,802/month — #14,793 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: c_uuid_v7-0.0.11-cp310-cp310-macosx_10_9_universal2.whl; c_uuid_v7-0.0.11-cp310-cp310-macosx_10_9_x86_64.whl; c_uuid_v7-0.0.11-cp310-cp310-macosx_11_0_arm64.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_armv7l.manylinux_2_31_armv7l.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_i686.manylinux_2_28_i686.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_s390x.manylinux_2_28_s390x.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl; c_uuid_v7-0.0.11-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_aarch64.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_armv7l.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_i686.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_ppc64le.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_riscv64.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_s390x.whl; c_uuid_v7-0.0.11-cp310-cp310-musllinux_1_2_x86_64.whl; c_uuid_v7-0.0.11-cp310-cp310-win32.whl; c_uuid_v7-0.0.11-cp310-cp310-win_amd64.whl; c_uuid_v7-0.0.11-cp310-cp310-win_arm64.whl

Programming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTyping :: Typed

Tags

uuid v7 generatorfast uuid generationuuid7 pythonhigh-performance uuidsortable uuidtime-based uuiduuid c extension
uuid-generationc-extensionperformance-critical

More Libraries packages