--- id: fastnanoid version: "0.4.3" license: unclear license_treatment: permissive maintenance: aging --- # fastnanoid — A tiny, secure URL-friendly, and fast unique string ID generator for Python, written in Rust. License: permissive · Maintenance: aging · Downloads: 155.6K/mo ## What it is and what it does fastnanoid is a Python library that generates short, unique, URL-safe string identifiers. It wraps a Rust implementation to provide performance gains over the original py-nanoid library. The package works as a drop-in replacement for py-nanoid's generate() function, requiring only a one-line import change. The library also includes helper functions to convert between UUIDs and base64url-encoded strings, useful when you already have a UUID (from a database, for example) and want to display it as a compact string. It supports Python 3.8 through 3.13 and is available as pre-compiled wheels for most common platforms, though installation does require matching the correct wheel for your Python version and architecture. Use it for: - Generate short, unique IDs for database records or API resources as an alternative to sequential or UUID-based identifiers. - Create URL-safe tokens for session management, API keys, or temporary access links without encoding overhead. - Convert existing UUIDs to compact base64url strings for cleaner display in URLs or user-facing interfaces. - Replace py-nanoid in existing projects where performance is a bottleneck in ID generation loops. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates unique, URL-friendly string IDs using a Rust-backed implementation that is faster than the original py-nanoid library. Yes, if you need fast, URL-friendly ID generation and are comfortable with compiled dependencies. The library is stable, permissively licensed, and actively maintained. Install friction is moderate due to Rust bindings, but wheels are widely available. Not necessary if you already use py-nanoid and performance is not a concern, or if you prefer pure-Python solutions. ## Install pip install fastnanoid uv add fastnanoid poetry add fastnanoid ## Installing fastnanoid Before you install: Medium install friction due to compiled Rust bindings, but wheels are available for Python 3.8–3.13 across multiple platforms (Linux, macOS, Windows, and ARM architectures). Last release was 410 days ago; the repository is active but aging. License in practice: Licensed under MIT (permissive), which allows commercial and private use with minimal restrictions. Quickstart: pip install fastnanoid from fastnanoid import generate id_string = generate() Requires Python 3.8 or later; compiled wheels must match your Python version and platform. Verify before relying: - Whether the 2.8x speed claim versus py-nanoid holds across real-world workloads and ID lengths. - How collision probability compares to standard nanoid implementations for production use cases. - Whether the uuid conversion helpers (uuid_to_urlid, urlid_to_uuid) are stable and widely tested. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 155.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unique id generator python, nanoid alternative, url-friendly string ids, fast uuid replacement, secure random id generation, rust-backed id library, short unique identifiers, id-generation, rust-backed, url-safe [View on SkillFed](https://skillfed.io/packages/fastnanoid) · [View on PyPI](https://pypi.org/project/fastnanoid/)