Registry / devops / uuid7-rs

uuid7-rs

JSON →
library0.0.8pypypi✓ verified 85d ago

Fast UUID v7 generation library implemented in Rust with Python bindings (PyO3). Version 0.0.8 is the latest, supporting Python >=3.10. Early stage, but already used in production-like settings. Release cadence is irregular.

pip install uuid7-rs
INSTALL
IMPORT
SIG · UUID7-RS
U
uuid7-rs
devopspythonv0.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uuid7
from uuid7_rs import uuid7
import uuid7
The module name on PyPI is uuid7-rs, but the Python import path uses an underscore: uuid7_rs. Common mistake to think the import matches the package name.
UUID7
from uuid7_rs import UUID7
from uuid7 import UUID7
Same as above, the correct package module is uuid7_rs, not uuid7.

Generate a UUID v7 (time-ordered, random) using the Rust-backed function.

from uuid7_rs import uuid7 # Generate a single UUID v7 string my_uuid = uuid7() print(my_uuid) # e.g., '018f3a1e-9b3c-7a00-8000-000000000001'
Debug
Known issues
gotchaThe library is not yet stable; API may change without notice. Version 0.x means breaking changes can occur in any release.
fix
Pin to exact version (e.g., uuid7-rs==0.0.8) and re-test when upgrading.
affects: all
gotchaThe generated UUIDs are strings, not uuid.UUID objects. If you need Python's native UUID type, convert manually.
fix
Use uuid.UUID(uuid7()) to get a native UUID object.
affects: all
deprecatedThe function `uuid7()` returns a string without hyphens in some early versions (0.0.1-0.0.4). As of 0.0.5+, it returns standard hyphenated format.
fix
Upgrade to >=0.0.5 for consistent hyphenated output, or use string formatting.
affects: <=0.0.4
Errors
Common errors & fixes
ImportError: cannot import name 'uuid7' from 'uuid7_rs'
The library might not be installed correctly, or you're using a very old version that didn't expose the function under that name.
fix
Ensure you have the latest version (pip install --upgrade uuid7-rs). Try importing UUID7 instead: from uuid7_rs import UUID7
OSError: /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0: cannot open shared object file
The Rust binary extension is incompatible with the system's Python runtime, often due to missing or mismatched libpython shared library.
fix
Install the library in a virtual environment or use a manylinux-compatible wheel. Consider using 'pip install uuid7-rs --only-binary=:all:'.
TypeError: 'str' object is not callable
You might have shadowed the function name by reassigning uuid7 to a string earlier in the code.
fix
Avoid using variable names that conflict with imported functions. Example: do not assign uuid7 = 'some_string'.
Upgrade
Version history
0.0.8latest on PyPI · released May 27, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
uuid7-rs — pip install uuid7-rs · libregistry