skillfed

types-pywin32

Typing stubs for pywin32

types-pywin32 v312.0.0.20260724 536.7K downloads/30d#6,123 on PyPI37
Permissive license Apache-2.0 Active released

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

uv

uv add types-pywin32

poetry

poetry add types-pywin32

Installing 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

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

Tags

pywin32 type stubstype checking windows apimypy pywin32 annotationspyright windows bindingstyping stubs pywin32
type-stubswindows-api

More Software Development packages