psutil

Cross-platform Python library for retrieving process and system utilization data.

Library
PyPI
v7.2.2
11,284 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
84 /100 Excellent
Development Activity 92
Maintenance 52
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
88 /100 Excellent
Architecture 88
Code Quality 90
Innovation 88
Learning Curve 85

psutil (process and system utilities) is a cross-platform Python library for retrieving information about running processes and system utilization, including CPU, memory, disks, network, and sensors. It implements many of the capabilities offered by classic UNIX command-line tools such as ps, top, free, iotop, netstat, ifconfig, and lsof, exposing them through a single, uniform Python API.

Used for system monitoring, profiling, resource limiting, and process management, psutil works consistently across Linux, Windows, macOS, FreeBSD, OpenBSD, NetBSD, Sun Solaris, and AIX. It is among the most-downloaded packages on PyPI, with hundreds of millions of downloads per month and adoption by hundreds of thousands of GitHub repositories.

What You Get

  • A uniform Python API over CPU, memory, disk, network, and sensor metrics that behaves identically across operating systems
  • A Process class for inspecting and controlling individual processes by PID (name, exe, CPU/memory usage, open files, connections, children, signals)
  • Compiled C extensions per platform (Linux, Windows, macOS, the BSDs, Solaris, AIX) with pure-Python fallbacks for portability
  • Named-tuple return values that make results self-documenting and easy to destructure
  • Broad Python support covering CPython 3.7+ and PyPy

Common Use Cases

  • Building system-monitoring dashboards and agents that report CPU, memory, disk, and network utilization
  • Profiling and measuring the resource footprint of a running application or benchmark
  • Enumerating, inspecting, and managing (suspend, resume, terminate) running processes
  • Implementing cross-platform equivalents of UNIX tools like top, ps, and netstat inside Python programs

Under The Hood

Architecture - psutil’s public surface lives in psutil/__init__.py, which re-exports a stable set of module-level functions and the Process class while delegating all real work to a per-platform backend selected at import time: _pslinux.py, _pswindows.py, _psosx.py, _psbsd.py, _pssunos.py, or _psaix.py. Each backend pairs a pure-Python module with a compiled C extension (_psutil_linux.c, _psutil_windows.c, and so on) that queries the operating system directly, and shared constants, exceptions, and helpers are centralized in _common.py, with named-tuple result types defined in _ntuples.py. This layered design keeps a single portable API in front of platform-specific system calls.

Tech Stack - The library is written in Python (CPython 3.7+ and PyPy) plus C for the native extensions, with the split roughly 62% Python and 37% C by volume. It has no runtime dependencies, keeping installs lightweight. Building from source uses setup.py and the C toolchain; development tooling is configured in pyproject.toml around ruff and black (line length 79), with a comprehensive Makefile orchestrating build, lint, and test targets.

Code Quality - Code quality is high and battle-tested. The tests/ directory holds 21 test modules including platform-specific suites (test_linux.py, test_windows.py, test_osx.py, the BSD/Solaris/AIX files), plus contract tests (test_contracts.py), memory-leak tests (test_memleaks.py), unicode handling, and type-hint checks (test_type_hints.py). Exceptions are modeled explicitly (NoSuchProcess, AccessDenied, ZombieProcess, TimeoutExpired), naming is consistent, and the project enforces a strict ruff ALL ruleset with targeted opt-outs.

API Design - The developer experience is a major strength: getting a metric is typically a single call such as psutil.cpu_percent() or psutil.virtual_memory(), and per-process inspection reads naturally through psutil.Process(pid). Return values are self-documenting named tuples, documentation on Read the Docs is thorough with copious examples, and the near-zero boilerplate plus consistent cross-platform semantics make the API easy to learn and hard to misuse.

Used by 41 apps in this directory

Python
99%
MIT

Agent Lightning

AI Development

18,515

A Microsoft-built training framework that optimizes AI agents with reinforcement learning, automatic prompt optimization, or supervised fine-tuning — with near-zero code changes to your existing agent, in any framework.

View details
85
Repo Health
68
Technical
69
Dependency
Built with
Python 99%
Updated 5 days ago
Python
47%
Other

Airbyte

Data Engineering · Developer Tools

22,143

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python 47%
Kotlin 43%
Updated 5 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 5 days ago
Python
68%
MIT

ArchiveBox

Bookmarks Archiving

28,636

Self-hosted web archiving that saves HTML, PDFs, screenshots, media, and code in open formats you own forever

View details
88
Repo Health
84
Technical
69
Dependency
Built with
Python 68%
HTML 25%
Updated 5 days ago
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,125

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
61
Dependency
Built with
Python 59%
Jupyter Notebook 21%
Updated 1 weeks ago
Python
66%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,596

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 66%
TypeScript 33%
Updated 5 days ago
Python
68%
Other

Baserow

Databases · No Code Platforms

6,012

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python 68%
JavaScript 16%
Vue 11%
Updated 6 days ago
Python
100%
Apache 2.0

BotCity Framework

Automation · Developer Tools

144

Computer-vision powered Python framework for building RPA bots that click, type, and read any desktop, web, or terminal UI without needing an API.

View details
55
Repo Health
53
Technical
67
Dependency
Built with
Python 100%
Updated 1 months ago
Python
79%
Apache 2.0

changedetection.io

Monitoring

34,605

Self-hosted website change detection with AI-powered smart alerts, browser automation, price tracking, and 85+ notification channels.

View details
91
Repo Health
80
Technical
68
Dependency
Built with
Python 79%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers