--- id: lexid version: "2021.1006" license: MIT license_treatment: permissive maintenance: abandoned --- # lexid — Variable width build numbers with lexical ordering. License: permissive · Maintenance: abandoned · Downloads: 534.3K/mo ## What it is and what it does lexid is a micro library that generates sequential IDs with a special property: they maintain lexical ordering across their entire sequence, whether you treat them as strings or numbers. This solves a real problem: most tools that read version tags or build numbers use simple string sorting, which fails for normal numeric sequences. lexid works by preemptively incrementing the leftmost digit and expanding padding when needed, so sequences like "0999" → "11000" preserve order even under naive string comparison. The package provides both a command-line tool and a Python API. It has minimal dependencies—only the standard library—and supports Python 2 and 3. The use case is narrow but concrete: anywhere you need version or build numbers that will be sorted by tools without semantic version parsing, such as git tags read by shell scripts. Use it for: - Generate git version tags that sort correctly when listed with standard sort commands - Create build numbers for CI/CD systems that display versions without understanding semantic versioning - Produce sequential IDs for systems that rely on lexical string comparison for ordering - Maintain version sequences in environments where only basic string sorting is available ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates lexically ordered numerical IDs that maintain sort order whether compared as integers or strings, useful for build numbers and version tags that need to sort correctly without special parsing. Yes, but only if you have a specific need for lexically sortable sequential IDs and accept the maintenance risk. The package is abandoned (last commit 2021-05-13) and receives no updates, so it's suitable only for stable, self-contained use cases where you don't expect to need fixes or Python version compatibility updates. ## Install pip install lexid uv add lexid poetry add lexid ## Installing lexid Before you install: Low install friction with only the standard library's typing module as a runtime dependency. Package is marked abandoned with last commit in 2021-05-13, over 1960 days ago, so expect no maintenance or updates. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or redistribution in commercial or private projects. Quickstart: $ pip install lexid $ lexid_incr 1001 1002 Or in Python: >>> import lexid >>> lexid.incr("1001") '1002' Verify before relying: - Whether the package remains compatible with Python versions released after 2021-04-02 - Real-world performance characteristics when generating large sequences of IDs ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 534.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags lexical ordering for version numbers, build number generation, sortable id sequences, version tags that sort correctly, string-comparable sequential ids, git tag ordering, variable-width id incrementation, version-numbering, build-tools [View on SkillFed](https://skillfed.io/packages/lexid) · [View on PyPI](https://pypi.org/project/lexid/)