skillfed

types-psutil

Typing stubs for psutil

types-psutil v7.2.2.20260518 7.9M downloads/30d#1,685 on PyPI37
Permissive license Apache-2.0 Active released

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

uv

uv add types-psutil

poetry

poetry add types-psutil

Installing 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

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

Tags

psutil type stubspsutil type hintstype checking psutilmypy psutil annotationspsutil typing supportpyright psutil stubspsutil type annotations
type-stubstype-checking

More Quality Assurance packages