Skip to content

Mahasvan/PySysInfo

Repository files navigation

PySysInfo

A Python Library to simplify retrieval of hardware components of your computer.

Installation

macOS / Linux

pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ PySysInfo

Windows

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ PySysInfo

Usage

from pysysinfo import HardwareManager
import json

hm = HardwareManager()

data = hm.fetch_hardware_info()

# All data returned are Pydantic models and have strict schema
# You can use it as is, or serialize it to JSON if you wish.
# We print the data in JSON here for readability.

json_data = json.loads(data.model_dump_json())
print(json.dumps(json_data, indent=2))

Tracker

Hardware Discovery Progress Tracker

Component Linux macOS Windows
CPU
GPU ✅* (1)
Memory
Network
Audio
Motherboard
Storage
Display ❌* (2) ✅* (3)
Vendor
Input
  1. PCIe gen info only for Nvidia
  2. In progress
  3. Need to rewrite C++ bindings

Miscellaneous Tasks / Problems

Task Status
GH actions for compiling interops/{platform}/*.{c|cpp} to their respective output directories
Group Pydantic Model fields into essential and optional
Remove pyobjc dependency in macOS by rewriting dependent code chunks in C++
Autodetection of storage units

Supporting Features

Feature Status
PCI Lookup — DeviceHunt
PCI Lookup — PCI IDs Repository (GitHub)
Logging
Working Library

About

Python Library implementation of OCSysInfo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors