--- id: ulid-py version: "1.1.0" license: Apache 2.0 license_treatment: permissive maintenance: abandoned --- # ulid-py — Universally Unique Lexicographically Sortable Identifier License: permissive · Maintenance: abandoned · Downloads: 1.9M/mo ## What it is and what it does ulid-py is a pure-Python implementation of the ULID specification, providing a 128-bit identifier format that combines a 48-bit millisecond-precision timestamp with 80 bits of cryptographic randomness. Unlike UUIDs, ULIDs are lexicographically sortable as strings, making them efficient for database indexing and time-ordered queries. The library generates new ULIDs with timestamp and randomness from standard library sources (time.time() and os.urandom()), and supports creating ULIDs from existing values including UUIDs, timestamps, and raw randomness. The package provides a MemoryView base class that allows ULIDs, timestamps, and randomness values to be represented in multiple formats (string, bytes, hex, int, binary, octal) and compared lexicographically. It handles type conversion automatically through a parse() method when the input type is unknown. The implementation is designed for fast, pure-Python operation without external dependencies, making it suitable for applications that need sortable, distributed identifiers without database coordination. Use it for: - Generate sortable unique IDs for database records that maintain insertion order without requiring a central sequence - Replace UUIDs in systems where lexicographic ordering and string efficiency matter, such as URL slugs or API keys - Create time-ordered event IDs in distributed systems where multiple services generate identifiers independently - Convert existing UUIDs or timestamps to ULID format for compatibility with systems expecting sortable identifiers - Extract timestamp information from existing ULID values for time-based queries or analytics ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates and parses ULIDs (Universally Unique Lexicographically Sortable Identifiers), which are 128-bit identifiers that combine a millisecond-precision timestamp with cryptographic randomness, sortable as strings. Yes, with conditions. The package is stable and production-ready for generating sortable identifiers, with no known vulnerabilities and low install friction. However, it is abandoned (last update September 2020) and may lack support for newer Python versions beyond 3.8. Install it if you need ULID functionality and can accept a dependency that will not receive updates; consider alternatives if you require active maintenance or support for Python 3.9+. ## Install pip install ulid-py uv add ulid-py poetry add ulid-py ## Installing ulid-py Before you install: Installation is straightforward with no runtime dependencies. The project is marked abandoned with last commit in March 2023, though it remains stable and has accumulated 739 repository stars. License in practice: Licensed under Apache 2.0 (permissive), allowing use in both open-source and proprietary projects with minimal restrictions. Quickstart: pip install ulid-py import ulid # Generate a new ULID u = ulid.new() print(u) # # Parse from various types u2 = ulid.parse('01BJQE4QTHMFP0S5J153XCFSP9') # Extract timestamp and randomness ts = u.timestamp() rand = u.randomness() Verify before relying: - Whether the abandoned status and lack of updates since 2020 affects compatibility with current Python 3.9+ releases - Performance characteristics compared to other ULID or UUID libraries in production workloads ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags unique sortable identifier generation, ULID implementation python, lexicographically sortable IDs, timestamp-based unique ID, UUID alternative, base32 encoded identifiers, distributed ID generation, identifier-generation, sortable-ids, distributed-systems [View on SkillFed](https://skillfed.io/packages/ulid-py) · [View on PyPI](https://pypi.org/project/ulid-py/)