{"id":6935,"library":"ulid-transform","title":"ULID-transform","description":"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.","status":"active","version":"2.2.0","language":"en","source_language":"en","source_url":"https://github.com/bluetooth-devices/ulid-transform","tags":["ulid","uuid","id-generation","performance","utility"],"install":[{"cmd":"pip install ulid-transform","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Minimum Python version required for the library.","package":"python","optional":false}],"imports":[{"symbol":"generate_ulid","correct":"from ulid_transform import generate_ulid"},{"symbol":"ulid_to_uuid","correct":"from ulid_transform import ulid_to_uuid"},{"note":"Commonly confused with other 'ulid' libraries; ensure import from 'ulid_transform'.","wrong":"from ulid import uuid_to_ulid","symbol":"uuid_to_ulid","correct":"from ulid_transform import uuid_to_ulid"}],"quickstart":{"code":"import uuid\nfrom ulid_transform import generate_ulid, ulid_to_uuid, uuid_to_ulid\n\n# Generate a new ULID\nnew_ulid = generate_ulid()\nprint(f\"Generated ULID: {new_ulid}\")\n\n# Convert a ULID string to a UUID object\nsome_ulid_str = \"01ARZ3NDEKTSV4RRFFQ69G5FAV\"\nconverted_uuid = ulid_to_uuid(some_ulid_str)\nprint(f\"ULID '{some_ulid_str}' converted to UUID: {converted_uuid}\")\n\n# Convert a UUID object (or string) to a ULID string\nsome_uuid_obj = uuid.uuid4()\nconverted_ulid = uuid_to_ulid(str(some_uuid_obj))\nprint(f\"UUID '{some_uuid_obj}' converted to ULID: {converted_ulid}\")","lang":"python","description":"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."},"warnings":[{"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.","message":"Version 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.","severity":"breaking","affected_versions":">=2.0.0"},{"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.","message":"Starting 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.","severity":"gotcha","affected_versions":">=2.1.0"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}