{"id":9737,"library":"fastnanoid","title":"Fast Nano ID","description":"Fastnanoid is a tiny, secure, URL-friendly, and highly performant unique string ID generator for Python, leveraging a Rust implementation via PyO3. It provides a drop-in replacement for other Nano ID implementations with a focus on speed. The current version is 0.4.3, with a release cadence that has seen several minor updates and performance improvements over the past year.","status":"active","version":"0.4.3","language":"python","source_language":"en","source_url":"https://github.com/oliverlambson/fastnanoid","tags":["id generation","unique id","nanoid","rust","performance"],"install":[{"cmd":"pip install fastnanoid","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"wrong":"from fastnanoid import nanoid","symbol":"fastnanoid","correct":"from fastnanoid import fastnanoid"},{"symbol":"generate","correct":"from fastnanoid import generate"},{"symbol":"uuid","correct":"from fastnanoid import uuid"}],"quickstart":{"code":"from fastnanoid import nanoid\n\n# Generate a default Nano ID\nid_default = nanoid()\nprint(f\"Default ID: {id_default}\")\n\n# Generate a Nano ID with a specific length\nid_short = nanoid(size=10)\nprint(f\"Short ID:   {id_short}\")\n\n# Generate a Nano ID with a custom alphabet and length\nid_numeric = nanoid(alphabet=\"0123456789\", size=8)\nprint(f\"Numeric ID: {id_numeric}\")","lang":"python","description":"This quickstart demonstrates how to import the `nanoid` function and generate IDs with default settings, a specified length, or a custom alphabet."},"warnings":[{"fix":"Ensure Rust is installed and configured correctly (e.g., `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`) or check if an appropriate wheel is available for your environment.","message":"When installing on certain platforms (e.g., specific Linux distributions, ARM architectures, or very new Python versions) for which pre-compiled wheels are not available, pip may attempt to compile `fastnanoid` from source. This requires the Rust toolchain (rustup, cargo) to be installed on the system.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always use `nanoid(size=10)` and `nanoid(alphabet='abc')` instead of `nanoid(10)` or `nanoid('abc')`.","message":"The `nanoid` function expects `size` and `alphabet` as keyword arguments. Passing them positionally or using incorrect keyword names will result in a `TypeError`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.4.3':48 'cadenc':52 'current':45 'drop':31 'drop-in':30 'fast':1 'fastnanoid':4 'focus':41 'friend':11 'generat':18,67 'high':13 'id':3,17,37,66,69 'implement':24,38 'improv':61 'leverag':21 'minor':57 'nano':2,36 'nanoid':70 'past':64 'perform':14,60,72 'provid':28 'pyo3':26 'python':20 'releas':51 'replac':33 'rust':23,71 'secur':8 'seen':55 'sever':56 'speed':43 'string':16 'tini':7 'uniqu':15,68 'updat':58 'url':10 'url-friend':9 'version':46 'via':25 'year':65","created_at":"2026-04-17T01:20:27.626020+00:00","updated_at":"2026-04-17T01:20:27.626020+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.4.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/oliverlambson/fastnanoid","docs":null,"changelog":null,"pypi":"https://pypi.org/project/fastnanoid/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}