mrdimidium /
nanoid
A tiny, secure, URL-friendly, unique string ID generator for Rust
87/100 healthLoading repository data…
oliverlambson / repository
A tiny, secure, URL-friendly, unique string ID generator for Python, written in Rust
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
fastnanoid is a tiny, secure URL-friendly, and fast unique string ID generator for Python, written in Rust.
It works as a drop in replacement for py-nanoid's generate():
- from nanoid import generate
+ from fastnanoid import generate
It's 2.8x faster than the original.
If you need the same amount of entropy as uuid, you may as well use uuid and base64url encode it:
import uuid
from fastnanoid import urlid_to_uuid, uuid_to_urlid
# say you have a uuid, maybe from your database:
id_ = uuid.uuid4() # type: uuid.UUID
# you can encoded it in base64url so it displays as a short string:
urlid = uuid_to_urlid(id_) # type: str
# and when you read it back in from the user, you can convert it back to a normal UUID:
decoded_urlid = urlid_to_uuid(urlid) # type: UUID
This is simpler than using a nanoid which is not compliant with any existing standards. If you already have a generated UUID (say from a database), this is much faster than generating a new nanoid. (If you don't have a UUID, generating one plus encoding it in base64url is about 50% slower than fastnanoid.)
* these are very simple helper functions, you can easily implement them yourself and save a dependency.
# local env
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
# build and use
maturin develop
python -c 'import fastnanoid; print(fastnanoid.generate())'
# test
cargo test
pytest
mypy
ruff check
ruff format --check
Inspired by py-nanoid
Selected from shared topics, language and repository description—not editorial ratings.
mrdimidium /
A tiny, secure, URL-friendly, unique string ID generator for Rust
87/100 healthmohammadreza-ashouri /
A tiny, secure and fast JVM written in RUST
37/100 healtharunanshub /
A tiny, secure, URL-friendly, unique string ID generator for Python, written in Rust.
/100 healthJiashuaiXu /
🦉 A privacy-first, tiny, and secure Rust app for Windows that gently reminds you to blink and maintain good posture.
36/100 healthb4dc0de /
Tiny process runner for Linux / Unix-like systems that securely hands off a secret to a child process over a dedicated file descriptor.
70/100 healthm-a-h-b-u-b /
A Secure Tiny Operating System for ARM Cortex-M IoT Devices based on Rust Programming Language
38/100 health