types-openpyxl
Typing stubs for openpyxl
What it is and what it does
types-openpyxl is a type stub package that provides type annotations for the openpyxl library. It allows Python type checkers to understand and validate code that uses openpyxl for reading and writing Excel files. The stubs are maintained as part of the typeshed project and are kept in sync with openpyxl releases.
When installed alongside openpyxl, this package enables your IDE and type checker to catch type errors before runtime—for example, catching incorrect method calls or type mismatches when working with worksheets and cells. The package requires Python 3.10 or later and has no runtime dependencies, making it a lightweight addition to your development environment.
Use it for:
- Enable mypy or pyright to type-check code that uses openpyxl for spreadsheet automation
- Catch type errors in Excel file generation scripts before running them
- Improve IDE autocomplete and inline documentation when writing openpyxl code
- Validate data transformation pipelines that read and write Excel files
- Enforce type safety in team projects that process Excel data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type hints for openpyxl, enabling static type checkers like mypy, pyright, and ty to validate code that uses openpyxl.
Yes, if you use openpyxl and want static type checking. Install it as a dev dependency alongside openpyxl 3.1.5 to get accurate type hints. The package is actively maintained, has no runtime overhead, and is part of the official typeshed project. No security vulnerabilities are known.
Install
types-openpyxl on PyPI
pip
pip install types-openpyxluv
uv add types-openpyxlpoetry
poetry add types-openpyxlInstalling types-openpyxl
Before you install
Low install friction; a pure stub package with no runtime dependencies. Actively maintained as part of typeshed, with a release 7 days old and tested against mypy 2.3.0, pyright 1.1.411, and ty 0.0.59.
License in practice
Apache-2.0 permissive license; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install types-openpyxl
import openpyxl
wb = openpyxl.load_workbook('file.xlsx')
Requires Python 3.10 or later
Verify before relying
- Whether these stubs cover all public APIs in openpyxl 3.1.5 or only a subset
- Compatibility with openpyxl versions other than 3.1.5
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 — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,227,004/month — #1,953 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_openpyxl-3.1.5.20260807-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
openpyxl-stubsProvides type stubs for openpyxl to enable…
permissive · top 15,000 on PyPI
types-reportlabProvides type hints for the reportlab PDF…
permissive · top 15,000 on PyPI
types-yt-dlpProvides type hints for yt-dlp, enabling static…
permissive · top 15,000 on PyPI
types-braintreeProvides type hints for the braintree payment…
permissive · top 15,000 on PyPI
types-docutilsProvides type hints for the docutils library,…
permissive · top 5,000 on PyPI
types-django-filterProvides type hints for django-filter, enabling…
permissive · top 15,000 on PyPI
types-PygmentsProvides type hints for the Pygments syntax…
permissive · top 5,000 on PyPI
types-geopandasProvides type annotations for the geopandas…
permissive · top 15,000 on PyPI
types-xlrdProvides type hints for the xlrd library,…
permissive · top 15,000 on PyPI
types-lxmlProvides complete external type annotations for…
permissive · top 5,000 on PyPI