types-nanoid
Typing stubs for nanoid
What it is and what it does
types-nanoid is a type stub package that provides type annotations for the nanoid library, a package used to generate unique string identifiers. Type stubs are metadata files that tell static type checkers like mypy and pyright what types nanoid's functions accept and return, without modifying nanoid itself. This allows developers to catch type errors in code that uses nanoid before runtime.
The package is maintained as part of typeshed, the central repository for Python type stubs. It has no runtime dependencies—it only adds type information to your development environment. Installation is straightforward and adds no overhead to your application, only to your type-checking workflow.
Use it for:
- Enable mypy or pyright to type-check code that imports and calls nanoid functions.
- Catch type mismatches when passing arguments to nanoid or using its return values in a type-aware IDE.
- Support strict type-checking workflows in projects that generate unique IDs with nanoid.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type hints for the nanoid package, enabling static type checkers like mypy and pyright to verify code that uses nanoid for generating unique IDs.
Yes, if you use nanoid and run static type checking. It has no runtime cost, low install friction, and is actively maintained by typeshed. Install it alongside nanoid in development environments to enable full type coverage. Not needed if you don't use type checkers or don't use nanoid.
Install
types-nanoid on PyPI
pip
pip install types-nanoiduv
uv add types-nanoidpoetry
poetry add types-nanoidInstalling types-nanoid
Before you install
Low install friction with no runtime dependencies. Actively maintained as part of typeshed; last commit 2026-08-14. Tested against mypy 1.20.0 and pyright 1.1.408.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most projects without significant restriction.
Quickstart
pip install types-nanoid
# In your code, import nanoid and use it; type checkers will now understand its types
import nanoid
id = nanoid.generate()
Requires Python >= 3.10. The nanoid package itself must be installed separately for runtime use.
Verify before relying
- Whether nanoid is automatically installed as a dependency or must be installed separately.
- Whether this stub package works with nanoid versions other than 2.0.0.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 98 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,118/month — #13,105 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_nanoid-2.0.0.20260508-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-tabulateProvides type hints for the tabulate package,…
permissive · top 5,000 on PyPI
types-grpcio-reflectionProvides type hints for grpcio-reflection,…
permissive · top 15,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-webencodingsProvides type hints for the webencodings…
permissive · top 5,000 on PyPI
types-html5libProvides type hints for the html5lib HTML…
permissive · top 5,000 on PyPI
types-coloramaProvides type stubs for colorama, enabling…
permissive · top 5,000 on PyPI
types-retryProvides type hints for the retry package,…
permissive · top 5,000 on PyPI
types-pynputProvides type hints for the pynput library,…
permissive · top 15,000 on PyPI
types-pyaudioProvides type hints for the pyaudio library,…
permissive · top 15,000 on PyPI
types-Flask-MigrateProvides type hints for Flask-Migrate, enabling…
permissive · top 15,000 on PyPI