skillfed

types-nanoid

Typing stubs for nanoid

types-nanoid v2.0.0.20260508 98.1K downloads/30d#13,105 on PyPI37
Permissive license Apache-2.0 Active released

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-nanoid

uv

uv add types-nanoid

poetry

poetry add types-nanoid

Installing 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs for nanoidnanoid type hintsmypy support for nanoidpyright type checking nanoidtyping stubs package
type-stubstype-checking

More Software Development packages