Fast UUID v4, v5, v7 generation in Rust
Project description
PyUUID7
Fast UUID v4, v5, and v7 generation in Rust for Python.
Installation
pip install pyuuid7
Usage
import pyuuid7
# Generate UUIDs
uuid_v4 = pyuuid7.uuid4() # Random UUID
uuid_v7 = pyuuid7.uuid7() # Time-sortable UUID
uuid_v5 = pyuuid7.uuid5( # Name-based UUID
"6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"example.com"
)
# Validation and parsing
pyuuid7.is_valid("a1b2c3d4-...") # True/False
pyuuid7.get_version("a1b2c3d4-...") # 4, 5, 7, etc.
pyuuid7.parse("A1B2C3D4-...") # Lowercase canonical format
UUID Versions
| Version | Description |
|---|---|
| v4 | Random UUID (122 random bits) |
| v5 | Name-based UUID using SHA-1 |
| v7 | Time-sortable UUID (Unix timestamp + random) |
Development
# Setup environment
mise install
mise run setup
# Build and test
mise run dev
mise run test
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyuuid7-0.1.0.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyuuid7-0.1.0.tar.gz.
File metadata
- Download URL: pyuuid7-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acbe67bd600c1faccb9aadc1f1b5ad83ca39200cfffeedf81bf9b2233ad46df4
|
|
| MD5 |
fe81fd2eb2d8d7d00fd13873513572c2
|
|
| BLAKE2b-256 |
902b4074a9c26350db5002000c41cad9ff2a8d586c08f71a80c8274ca99ed31c
|
File details
Details for the file pyuuid7-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pyuuid7-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 216.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99c4fec4a3924a075d6ffcdf33880a845e77ecc8eb5ea2402da3097e5d1d7d27
|
|
| MD5 |
cb0cc911684ebc4fff63e83a4722ed1f
|
|
| BLAKE2b-256 |
cdd35c885c204a0192bec03d882a1626217d0f8b29b7627f1855e80174085147
|