typeid-python
Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
What it is and what it does
TypeID Python is a high-performance library for generating and parsing TypeIDs—identifiers that combine UUIDv7 with optional type prefixes to create globally unique, time-sortable, human-readable IDs. The library is implemented in Rust and wrapped for Python, delivering significant performance gains: generation is roughly 5× faster and parsing roughly 1.6× faster than a pure-Python baseline. It supports type-safe prefix usage through Python's type system, allows parsing from strings or raw UUIDs, and includes CLI tools for ID generation, encoding, decoding, and explanation.
The package depends only on uuid-utils for fast UUIDv7 generation and is designed to be framework-agnostic; optional integrations with Pydantic (v2) are available as extras. TypeIDs are designed for modern systems where identifiers need to be globally unique, sortable by creation time, safe to expose externally, and easy to reason about in logs and APIs. The library runs fully offline with no external service dependencies.
Use it for:
- Generate type-safe user or order IDs with automatic timestamps for time-based sorting in databases and APIs.
- Replace generic UUIDs in microservices where readable prefixes and creation-time ordering improve observability and debugging.
- Integrate with Pydantic models for automatic validation and JSON Schema support of TypeID fields.
- Decode and explain existing TypeIDs via CLI to understand their creation time and metadata without external services.
- Build distributed systems where globally unique, sortable identifiers are needed without a central ID service.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates and parses TypeIDs—type-safe, sortable identifiers based on UUIDv7 with optional prefixes, backed by Rust acceleration for high-performance generation and parsing.
Yes, if you need sortable, type-safe identifiers with Rust-backed performance. The library is actively maintained, has no known vulnerabilities, and offers a permissive MIT license. Install friction is moderate due to compiled wheels, but pre-built binaries cover common platforms. Suitable for production use in modern Python applications (3.10+) where identifier semantics and performance matter.
Install
typeid-python on PyPI
pip
pip install typeid-pythonuv
uv add typeid-pythonpoetry
poetry add typeid-pythonInstalling typeid-python
Before you install
Medium install friction due to compiled Rust wheels, but pre-built binaries are available for common platforms (macOS x86_64/arm64, Linux aarch64, Windows x64) covering Python 3.10–3.14. Actively maintained with a recent release.
License in practice
MIT license (permissive) allows unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install typeid-python
from typeid import TypeID
tid = TypeID(prefix="user")
print(str(tid)) # e.g., user_01h45ytscbebyvny4gc8cr8ma2
Requires Python 3.10 or later; compiled Rust wheels must be available for your platform (macOS, Linux aarch64, or Windows x64 are supported).
Verify before relying
- Whether the package's Pydantic integration (mentioned as available) is included in the base install or requires a separate extra.
- Exact performance characteristics on platforms other than those with pre-built wheels (e.g., Linux x86_64, which may require compilation).
- Whether FastAPI and SQLAlchemy integrations mentioned as 'Coming Soon' are now available in version 0.3.10.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — uuid-utils |
| Maintenance | actively maintained — 61 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 621,274/month — #5,718 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typeid_python-0.3.10-cp310-cp310-macosx_10_12_x86_64.whl; typeid_python-0.3.10-cp310-cp310-macosx_11_0_arm64.whl; typeid_python-0.3.10-cp310-cp310-manylinux_2_28_aarch64.whl; typeid_python-0.3.10-cp310-cp310-win_amd64.whl; typeid_python-0.3.10-cp311-cp311-macosx_10_12_x86_64.whl; typeid_python-0.3.10-cp311-cp311-macosx_11_0_arm64.whl; typeid_python-0.3.10-cp311-cp311-manylinux_2_28_aarch64.whl; typeid_python-0.3.10-cp311-cp311-win_amd64.whl; typeid_python-0.3.10-cp312-cp312-macosx_10_12_x86_64.whl; typeid_python-0.3.10-cp312-cp312-macosx_11_0_arm64.whl; typeid_python-0.3.10-cp312-cp312-manylinux_2_28_aarch64.whl; typeid_python-0.3.10-cp312-cp312-win_amd64.whl; typeid_python-0.3.10-cp313-cp313-macosx_10_12_x86_64.whl; typeid_python-0.3.10-cp313-cp313-macosx_11_0_arm64.whl; typeid_python-0.3.10-cp313-cp313-manylinux_2_28_aarch64.whl; typeid_python-0.3.10-cp313-cp313-win_amd64.whl; typeid_python-0.3.10-cp314-cp314-macosx_10_12_x86_64.whl; typeid_python-0.3.10-cp314-cp314-macosx_11_0_arm64.whl; typeid_python-0.3.10-cp314-cp314-manylinux_2_28_aarch64.whl; typeid_python-0.3.10-cp314-cp314-win_amd64.whl
Keywords: typeid, uuid, rust, guid, uuid7
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ulidGenerates ULIDs (Universally Unique…
permissive · top 15,000 on PyPI
ulid-pyGenerates and parses ULIDs (Universally Unique…
permissive · top 5,000 on PyPI
uuid-v7Generates UUID v7 and v6 identifiers, extending…
unclear · top 15,000 on PyPI
uuid-extensionGenerates UUID version 7…
unclear · top 15,000 on PyPI
uuid-utilsFast UUID generation and manipulation for all…
permissive · top 1,000 on PyPI
python-ulidGenerates and manipulates ULIDs (universally…
permissive · top 5,000 on PyPI
uuid7Generates version 7 UUIDs that are…
permissive · top 5,000 on PyPI
sqidsSqids encodes numbers into short, unique,…
permissive · top 15,000 on PyPI
rust-demanglerConverts mangled Rust symbol names into their…
permissive · top 15,000 on PyPI
ulid-transformGenerate and convert ULIDs (Universally Unique…
permissive · top 15,000 on PyPI