This PyPI package (version 1.30) provides a backport of the `uuid` module's functionality for older Python versions, specifically 2.3 through 2.5. For Python 2.6 and newer, the `uuid` module is included in the Python standard library and this PyPI package is generally not needed. It was last released in 2006 and is not actively maintained.
pip install uuidVerified import paths — ran on the pinned version, not inferred.
Demonstrates generating version 1 and version 4 UUIDs, and reconstructing a UUID object from its string representation using the PyPI `uuid` package, which mirrors the standard library's API for older Python versions.
For Python 2.6+, simply `import uuid` without `pip install uuid`. If you must support older Python 2.x versions (2.3-2.5), then `pip install uuid` is appropriate.
If privacy is a concern, prefer `uuid.uuid4()` for generating random UUIDs or `uuid.uuid7()` (available in Python 3.14+) for time-ordered UUIDs without MAC address exposure.
Use your database's native UUID type if available (e.g., `UUID` in PostgreSQL). If not, store UUIDs as 16-byte binary fields (e.g., `VARBINARY(16)` or `BINARY(16)`) and convert using `my_uuid.bytes` in Python.
If you require newer UUID versions (6, 7, or 8), you must use Python 3.14 or a newer version of the standard library. Otherwise, adhere to versions 1, 3, 4, or 5. Consider `uuid4()` for general randomness.
For mission-critical applications where absolute uniqueness is paramount, consider implementing additional collision detection logic or relying on database-side UUID generation functions where the database ensures uniqueness with constraints.
Avoid relying on `uuid1()` for persistent identifiers that must remain constant across hardware or network changes. Use `uuid4()` or name-based UUIDs (`uuid3()`, `uuid5()`) instead, or store and reuse a generated UUID.
No dependency data recorded yet.