Registry / serialization / ulid-transform

ulid-transform

JSON →
library2.2.9pypypi✓ verified 84d ago

ULID-transform is a high-performance Python library designed for creating and transforming ULIDs (Universally Unique Lexicographically Sortable Identifiers). It provides efficient generation of ULIDs and seamless conversion between ULIDs and UUIDs. The library is currently at version 2.2.0 and maintains an active release cadence, frequently incorporating performance enhancements and bug fixes.

pip install ulid-transform
INSTALL
IMPORT
SIG · ULID-TRANSFORM
U
ulid-transform
serializationpythonv2.2.9
Install
1.6s avg
Import
—
Disk
17MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 1.63s
py 3.11
✓ —
✓ 1.73s
py 3.12
✓ —
✓ 1.53s
py 3.13
✓ —
✓ 1.55s
py 3.9
✕ build_error
✕ build_error
17MB installed
● package 17MB
Code
Verified usage

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

ulid_now
✓ from ulid_transform import ulid_now
✗ from ulid_transform import generate_ulid
ulid_at_time
✓ from ulid_transform import ulid_at_time
ulid_hex
✓ from ulid_transform import ulid_hex

This quickstart demonstrates how to generate a new ULID and perform conversions between ULID strings and UUID objects using the core functions of the `ulid-transform` library.

import uuid from ulid_transform import generate_ulid, ulid_to_uuid, uuid_to_ulid # Generate a new ULID new_ulid = generate_ulid() print(f"Generated ULID: {new_ulid}") # Convert a ULID string to a UUID object some_ulid_str = "01ARZ3NDEKTSV4RRFFQ69G5FAV" converted_uuid = ulid_to_uuid(some_ulid_str) print(f"ULID '{some_ulid_str}' converted to UUID: {converted_uuid}") # Convert a UUID object (or string) to a ULID string some_uuid_obj = uuid.uuid4() converted_ulid = uuid_to_ulid(str(some_uuid_obj)) print(f"UUID '{some_uuid_obj}' converted to ULID: {converted_ulid}")
Debug
Known issues
breakingVersion 2.0.0 introduced a significant change in the minimum Python requirement, now mandating Python 3.11 or newer. Prior versions (e.g., 1.x) supported Python 3.8+. This release also involved a complete internal rewrite from Cython to a hand-written C extension for performance, which, while largely maintaining the public API, could introduce subtle behavioral changes.
fix
Ensure your project is running on Python 3.11 or later before upgrading to `ulid-transform` v2.0.0 or higher. Thoroughly test existing ULID-related logic after upgrading.
affects: >=2.0.0
gotchaStarting with version 2.1.0, the library replaced the MT19937 random number generator with SplitMix64 for entropy. This optimization improves performance but means that ULIDs generated in sequential calls will produce a different sequence compared to prior versions, even under identical seeding (if applicable). For applications that depend on bit-for-bit deterministic ULID generation across versions (e.g., for specific testing scenarios), this change is relevant.
fix
Be aware that ULID sequences may differ when upgrading from versions prior to 2.1.0. This is generally not an issue for typical use cases but could affect very specific testing or cryptographic-like scenarios.
affects: >=2.1.0
Upgrade
Version history
2.2.9latest on PyPI · released May 25, 2026
Audit
Dependencies
pythonrequiredMinimum Python version required for the library.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ulid-transform — pip install ulid-transform · libregistry