types-psutil
Typing stubs for psutil
What it is and what it does
types-psutil is a type stub package that provides type annotations for psutil, the system and process monitoring library. It allows static type checkers—mypy, pyright, and others—to understand and validate code that imports and uses psutil, catching type errors at development time rather than runtime.
The package is maintained as part of typeshed, the standard repository of type stubs for the Python ecosystem. This version targets psutil 7.2.2 and has been tested with mypy 2.1.0 and pyright 1.1.409. Installation adds no runtime overhead; it only affects type checking. It requires Python 3.10 or later.
Use it for:
- Enable mypy or pyright to type-check code that calls psutil functions for CPU, memory, or process information.
- Catch incorrect argument types or missing attributes when working with psutil.Process or psutil.sensors in an IDE with inline type checking.
- Maintain type safety in system administration or monitoring scripts that rely on psutil's API.
- Integrate psutil into a larger typed codebase without losing type information at module boundaries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type annotations for the psutil library, enabling type checkers like mypy and pyright to validate code that uses psutil for system and process monitoring.
Yes, if you use psutil and run a type checker. It is a lightweight, actively maintained stub package with no runtime dependencies and permissive licensing. Install it alongside psutil to get accurate type hints during development. No reason not to if you are already using a type checker.
Install
types-psutil on PyPI
pip
pip install types-psutiluv
uv add types-psutilpoetry
poetry add types-psutilInstalling types-psutil
Before you install
Low friction installation with no runtime dependencies. Maintained as part of the typeshed project with active updates; last release 88 days ago.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most projects without significant legal constraints.
Quickstart
pip install types-psutil
# In your code, type checkers will now understand psutil imports:
import psutil
proc: psutil.Process = psutil.Process()
Requires Python 3.10 or later; type checking requires a compatible type checker like mypy 2.1.0 or pyright 1.1.409.
Verify before relying
- Whether types-psutil stays synchronized with psutil releases beyond 7.2.2
- Coverage completeness for all psutil APIs in the current version
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 — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,860,145/month — #1,685 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_psutil-7.2.2.20260518-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
types-mockProvides type stubs for the mock library,…
permissive · top 5,000 on PyPI
types-polibProvides type stubs for the polib package,…
permissive · top 15,000 on PyPI
types-pyperclipProvides type annotations for the pyperclip…
permissive · top 15,000 on PyPI
types-docutilsProvides type hints for the docutils library,…
permissive · top 5,000 on PyPI
types-pexpectProvides type stubs for pexpect, enabling type…
permissive · top 5,000 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
types-jmespathProvides type annotations for the jmespath…
permissive · top 5,000 on PyPI
types-python-dateutilProvides type annotations for the…
permissive · top 1,000 on PyPI
types-simplejsonProvides type annotations for the simplejson…
permissive · top 5,000 on PyPI