--- id: ulid-transform version: "2.2.9" license: MIT license_treatment: permissive maintenance: active --- # ulid-transform — Create and transform ULIDs License: permissive · Maintenance: active · Downloads: 779.7K/mo ## What it is and what it does ulid-transform is a library for creating and converting ULIDs—sortable unique identifiers with timestamp components. It provides functions to generate new ULIDs, extract timestamps from existing ones, and convert between string, bytes, and hexadecimal representations. The library uses a C++ implementation when available for speed, automatically falling back to pure Python if the compiled extension cannot be loaded, ensuring it works across all supported platforms without requiring manual configuration. The package targets developers building systems that need sortable, time-ordered identifiers—common in databases, distributed systems, and event logging. With no runtime dependencies and support for Python 3.11 through 3.14, it integrates easily into existing projects. The dual implementation strategy means you get performance when possible but never fail to function. Use it for: - Generate sortable unique IDs for database records that maintain insertion order without a separate timestamp column - Extract millisecond-precision timestamps from existing ULIDs for audit trails or time-series analysis - Convert between ULID string format and binary representation for efficient storage or network transmission - Create ULIDs at specific historical timestamps for backfilling or testing time-dependent logic - Safely handle ULID conversions with None-aware functions in data pipelines that may encounter missing values ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generate and convert ULIDs (Universally Unique Lexicographically Sortable Identifiers) with optional C++ acceleration, falling back to pure Python when unavailable. Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and provides a focused, zero-dependency solution for ULID operations. Medium install friction is offset by prebuilt wheels for all major platforms and Python versions. Install if you need sortable unique identifiers with timestamp extraction. ## Install pip install ulid-transform uv add ulid-transform poetry add ulid-transform ## Installing ulid-transform Before you install: Medium install friction due to compiled wheels for multiple platforms and Python versions (3.11–3.14). Active maintenance with recent release (81 days ago) and no known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements. Quickstart: pip install ulid-transform import ulid_transform # Generate a new ULID ulid_str = ulid_transform.ulid_now() print(ulid_str) # e.g., '0001HZX0NW00GW0X476W5TVBFE' # Extract timestamp (milliseconds since epoch) ts = ulid_transform.ulid_to_timestamp(ulid_str) print(ts) # e.g., 1677623996 # Convert to bytes ulid_bytes = ulid_transform.ulid_to_bytes(ulid_str) print(ulid_bytes) # e.g., b'\x00\x00c\xfe\x82\xbc...' Requires Python 3.11 or later; C++ extension wheels are provided for common platforms but pure Python fallback is available. Verify before relying: - Whether the C++ extension provides measurable performance gains over pure Python for typical workloads - Compatibility with Python 3.14 given it is listed in classifiers but may be pre-release ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 779.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ulid generation, ulid conversion, sortable unique identifiers, ulid to bytes, ulid timestamp extraction, fast ulid library, ulid hex conversion, identifier-generation, timestamp-extraction, sortable-ids [View on SkillFed](https://skillfed.io/packages/ulid-transform) · [View on PyPI](https://pypi.org/project/ulid-transform/)