types-pywin32
Typing stubs for pywin32
What it is and what it does
types-pywin32 is a type stub package that provides type information for the pywin32 library, which binds Python to Windows APIs. When installed alongside pywin32, it allows static type checkers like mypy and pyright to understand the types and signatures of Windows API calls, catching type errors at check time rather than runtime. This is particularly useful for developers working with Windows-specific functionality who want the safety of static type checking.
The package is generated from and maintained as part of the typeshed project, the canonical repository of type stubs for third-party Python libraries. It targets pywin32 version 312.* and has been tested with mypy 2.3.0 and pyright 1.1.411. Since it contains only type information and no runtime code, it has zero runtime dependencies and installs quickly.
Use it for:
- Enable mypy or pyright to type-check Windows API code that uses pywin32 without false positives.
- Catch type errors in Windows system calls (registry, COM, Win32 API) before runtime.
- Provide IDE autocomplete and inline documentation for pywin32 functions in editors that support type stubs.
- Validate code that wraps or extends pywin32 functionality with proper type safety.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for pywin32, enabling type checkers like mypy and pyright to validate code using Windows API bindings.
Yes, if you use pywin32 and run static type checking. Install it alongside pywin32 to get accurate type information for Windows API calls. No downside: it has no dependencies, installs instantly, and is actively maintained. Skip it only if you don't use type checkers or don't use pywin32.
Install
types-pywin32 on PyPI
pip
pip install types-pywin32uv
uv add types-pywin32poetry
poetry add types-pywin32Installing types-pywin32
Before you install
Low install friction with no runtime dependencies. Actively maintained as part of typeshed, with a recent release 21 days old and tested against mypy 2.3.0 and pyright 1.1.411.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most projects without significant restrictions.
Quickstart
pip install types-pywin32
import pywin32 # Now type checkers understand pywin32's types
# Run mypy or pyright on your code
Requires Python >=3.10; intended for use alongside pywin32 itself.
Verify before relying
- Whether this stub package covers all pywin32 312.* APIs or only a subset of the surface.
- How closely the stubs track pywin32 releases and whether version mismatches cause type-checking issues.
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 — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 536,719/month — #6,123 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_pywin32-312.0.0.20260724-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
pywin32Provides Python access to Windows APIs and COM…
permissive · top 1,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-boltonsProvides type stubs for the boltons library,…
permissive · top 15,000 on PyPI
pywin32-ctypesA pure-Python reimplementation of pywin32 that…
permissive · top 5,000 on PyPI
pypiwin32Installs pywin32 as a dependency, providing…
unclear · top 5,000 on PyPI
types-sixProvides type hints for the six Python 2/3…
permissive · top 5,000 on PyPI
types-shapelyProvides type stubs for the shapely package,…
permissive · top 15,000 on PyPI
types-MarkdownProvides type stubs for the Markdown package,…
permissive · top 5,000 on PyPI
types-pyinstallerProvides type stubs for pyinstaller, enabling…
permissive · top 15,000 on PyPI