py-cpuinfo
Get CPU info with pure Python
Decision gist · record as of 2026-08-14
Yes, if you need lightweight CPU detection without external dependencies and can tolerate dormant maintenance. The package is stable and widely used (top 1000 on PyPI), has no known vulnerabilities, and requires no compilation. However, avoid it if you need active support for cutting-edge architectures or recent OS versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction; no runtime dependencies.
- Maintenance is dormant—last release was 2022-10-25, so expect no active bug fixes or updates for new OS versions or Python releases.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
last release 2022-10-25 (1389 days) · last repo commit 2024-03-22 · 343 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 27,770,464 downloads/mo, #848 on PyPI
Alternatives
Verify before relying
pip install py-cpuinfo
from cpuinfo import get_cpu_info
info = get_cpu_info()
print(info['hz_advertised_friendly'])
print(info['count'])- Whether raw CPU fields (vendor_id_raw, brand_raw, etc.) are reliably populated on all supported architectures and OS versions.
- Current accuracy of CPU detection on modern ARM, RISC-V, and other non-x86 architectures given the dormant maintenance status.
- Whether the package continues to work correctly with recent Python 3 releases and modern OS kernel changes.
What it is and what it does
py-cpuinfo is a pure-Python library that queries your CPU's properties—vendor, model, frequency, cache hierarchy, instruction set flags, and core count—without requiring external programs, compilation, or system libraries. It works by reading OS-specific sources: Windows Registry on Windows, /proc/cpuinfo on Linux, sysctl on OS X, and similar mechanisms on BSD, Solaris, and other Unix variants. It also attempts direct CPUID register queries on Intel X86 CPUs when OS-level sources are unavailable.
The package exports two main functions: get_cpu_info() returns a dictionary of CPU properties, and get_cpu_info_json() returns the same data as JSON. Fields include both high-level normalized values (architecture, bit width, core count, friendly frequency strings) and raw unverified fields pulled directly from the CPU, which the documentation cautions may contain garbage. It supports X86 32bit and 64bit and some ARM, LoongArch, MIPS, PPC, RISCV, SPARC, and S390X architectures.
Use it for
- Detect CPU core count and architecture at runtime to optimize thread pools or SIMD code paths.
- Report system CPU capabilities in diagnostics, telemetry, or system profiling tools.
- Check for specific CPU instruction set flags (SSE, AVX, etc.) to gate optional performance features.
- Gather CPU frequency and cache information for performance benchmarking or capacity planning.
- Embed CPU detection in cross-platform applications without adding native dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight CPU detection without external dependencies and can tolerate dormant maintenance.
The package is stable and widely used (top 1000 on PyPI), has no known vulnerabilities, and requires no compilation. However, avoid it if you need active support for cutting-edge architectures or recent OS versions.
Install
py-cpuinfo on PyPI
Before you install
Low install friction; no runtime dependencies. Maintenance is dormant—last release was 2022-10-25, so expect no active bug fixes or updates for new OS versions or Python releases.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install py-cpuinfo
from cpuinfo import get_cpu_info
info = get_cpu_info()
print(info['hz_advertised_friendly'])
print(info['count'])
Verify before relying
- Whether raw CPU fields (vendor_id_raw, brand_raw, etc.) are reliably populated on all supported architectures and OS versions.
- Current accuracy of CPU detection on modern ARM, RISC-V, and other non-x86 architectures given the dormant maintenance status.
- Whether the package continues to work correctly with recent Python 3 releases and modern OS kernel changes.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,389 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 27,770,464 / month, #848 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Utilities |
Evidence: py_cpuinfo-9.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cpu info detection python”
- py-cpuinfoDetects and reports CPU information—architecture, frequency, cache…
- scoobyScooby generates formatted reports of your Python environment's…
- archinfoProvides architecture-specific metadata and information classes for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also vllm-cpu · Adafruit-PlatformDetect · unicorn · capstone · psutil · extra-platforms · archinfo · intel-openmp · pywin32-ctypes · uptime