types-pyserial
Typing stubs for pyserial
What it is and what it does
types-pyserial is a type stub package that adds static type information to the pyserial library. It allows Python type checkers like mypy and pyright to understand and validate code that uses pyserial's serial port APIs, catching type errors before runtime. The stubs are maintained as part of the typeshed project and are kept in sync with pyserial 3.5.* releases.
This package contains no runtime code—it only provides type annotations. You install it alongside pyserial to enable type checking in your IDE and CI/CD pipelines. It requires Python 3.10 or later and has no external dependencies, making it a lightweight addition to any project that already uses pyserial.
Use it for:
- Enable type checkers to validate code that uses pyserial for serial port communication.
- Catch type mismatches in serial port configuration at development time.
- Add IDE autocomplete and inline type hints for pyserial methods and properties.
- Enforce type safety in embedded systems or IoT projects that communicate over serial interfaces.
- Integrate serial port code into a strictly typed Python codebase without disabling type checking.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type hints for the pyserial library, enabling static type checkers like mypy and pyright to validate code that uses serial port communication.
Yes, if you use pyserial and want static type checking. Install it alongside pyserial to enable type validation in mypy or pyright with zero runtime overhead. No security concerns, actively maintained, and permissively licensed. Only skip it if you don't use a type checker or don't use pyserial.
Install
types-pyserial on PyPI
pip
pip install types-pyserialuv
uv add types-pyserialpoetry
poetry add types-pyserialInstalling types-pyserial
Before you install
Low friction installation with no runtime dependencies. Actively maintained as part of the typeshed project with recent updates.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction.
Quickstart
pip install types-pyserial
# Type checkers will now understand pyserial code in your project
Requires Python 3.10 or later. Only useful when used alongside the actual pyserial package and a compatible type checker.
Verify before relying
- Whether these stubs cover all pyserial 3.5.* APIs or only a subset of the public interface.
- Compatibility with type checkers other than mypy 2.2.0 and pyright 1.1.411.
- Whether installing types-pyserial automatically satisfies type checking for existing pyserial code without additional configuration.
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 — 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,431,771/month — #3,912 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_pyserial-3.5.0.20260712-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-pynputProvides type hints for the pynput library,…
permissive · top 15,000 on PyPI
types-pycurlProvides type hints for the pycurl HTTP client…
permissive · top 15,000 on PyPI
types-python-joseProvides type hints for the python-jose…
permissive · top 5,000 on PyPI
pexpect-serialExtends pexpect to work with serial ports by…
permissive · top 15,000 on PyPI
types-pyfarmhashProvides type hints for the pyfarmhash hashing…
permissive · top 15,000 on PyPI
types-pyRFC3339Provides type hints for pyRFC3339, enabling…
permissive · top 15,000 on PyPI
types-pyaudioProvides type hints for the pyaudio library,…
permissive · top 15,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-gdbProvides type stubs for GDB's Python API,…
permissive · top 15,000 on PyPI
types-dockerProvides type hints for the docker package,…
permissive · top 5,000 on PyPI