--- id: typeid-python version: "0.3.10" license: unclear license_treatment: permissive maintenance: active --- # typeid-python — Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs License: permissive · Maintenance: active · Downloads: 621.3K/mo ## 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 above — 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 pip install typeid-python uv add typeid-python poetry add typeid-python ## Installing 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_current - Install friction: medium - Maintenance: active - Downloads: 621.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sortable unique identifiers, uuidv7 type-safe ids, rust-accelerated id generation, prefixed globally unique identifiers, time-sortable id library, typeid implementation python, stripe-style id generation, identifier-generation, rust-accelerated, uuidv7 [View on SkillFed](https://skillfed.io/packages/typeid-python) · [View on PyPI](https://pypi.org/project/typeid-python/)