py-cpuinfo

9.0.0 · active · verified Sun Mar 29

Py-cpuinfo is a pure Python library designed to retrieve detailed CPU information across various operating systems, including Linux, macOS, Windows, BSD, Solaris, Cygwin, Haiku, and BeagleBone. It functions without requiring any external programs or compilation beyond the standard OS provisions. The library is compatible with Python 3. The current stable version is 9.0.0, released in October 2022.

Warnings

Install

Imports

Quickstart

This example demonstrates how to retrieve and print all available CPU information using the `get_cpu_info()` function.

from cpuinfo import get_cpu_info

info = get_cpu_info()
for key, value in info.items():
    print(f"{key}: {value}")

view raw JSON →