fastnanoid
A tiny, secure URL-friendly, and fast unique string ID generator for Python, written in Rust.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; compiled wheels must match your Python version and platform.
- 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 · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), which allows commercial and private use with minimal restrictions.
last release 2025-06-30 (410 days) · last repo commit 2025-06-30 · 79 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 155,572 downloads/mo, #10,808 on PyPI
Alternatives
Verify before relying
pip install fastnanoid
from fastnanoid import generate
id_string = generate()- 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.
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 on this page. Verify before relying on it.
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
fastnanoid on PyPI
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.
Requires Python 3.8 or later; compiled wheels must match your Python version and platform.
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()
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Aging 410 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 155,572 / month, #10,808 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTyping :: Typed |
Evidence: fastnanoid-0.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastnanoid-0.4.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; fastnanoid-0.4.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; fastnanoid-0.4.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; fastnanoid-0.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastnanoid-0.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; fastnanoid-0.4.3-cp310-cp310-musllinux_1_2_aarch64.whl; fastnanoid-0.4.3-cp310-cp310-musllinux_1_2_armv7l.whl; fastnanoid-0.4.3-cp310-cp310-musllinux_1_2_i686.whl; fastnanoid-0.4.3-cp310-cp310-musllinux_1_2_x86_64.whl; fastnanoid-0.4.3-cp310-cp310-win32.whl; fastnanoid-0.4.3-cp310-cp310-win_amd64.whl; fastnanoid-0.4.3-cp311-cp311-macosx_10_12_x86_64.whl; fastnanoid-0.4.3-cp311-cp311-macosx_11_0_arm64.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastnanoid-0.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “nanoid alternative”
- fastnanoidGenerates unique, URL-friendly string IDs using a Rust-backed…
- nanoidGenerates cryptographically secure, URL-friendly unique IDs shorter…
- types-nanoidProvides type hints for the nanoid package, enabling static type…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also nanoid · shortuuid · ulid · cuid2 · uuid-utils · ulid-py · fastuuid · types-nanoid · timeflake · uuid