Skip to main content

A cross-platform system information gatherer

Project description

HWProbe

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

Installation

macOS / Linux

pip3 install HWProbe

Windows

pip install HWProbe

Usage

from hwprobe 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))
Sample Output
{
  "cpu": {
    "status": {
      "type": "success",
      "messages": []
    },
    "name": "Apple M3 Pro",
    "architecture": "ARM",
    "bitness": 64,
    "arch_version": "8",
    "vendor": "Apple",
    "sse_flags": [],
    "cores": 12,
    "threads": 12
  },
  "memory": {
    "status": {
      "type": "success",
      "messages": [
        "ARM macOS only exposes partial RAM data."
      ]
    },
    "modules": [
      {
        "manufacturer": "Micron",
        "part_number": null,
        "type": "LPDDR5",
        "capacity": {
          "capacity": 18,
          "unit": "GB"
        },
        "frequency_mhz": null,
        "slot": null,
        "supports_ecc": null,
        "ecc_type": null
      }
    ]
  },
  "storage": {
    "status": {
      "type": "success",
      "messages": []
    },
    "modules": [
      {
        "model": "APPLE SSD AP0512Z",
        "manufacturer": "Apple",
        "identifier": "disk0",
        "location": "Internal",
        "connector": "Apple Fabric",
        "type": "Solid State Drive (SSD)",
        "vendor_id": null,
        "device_id": null,
        "size": {
          "capacity": 477102,
          "unit": "MB"
        }
      },
      {
        "model": "Built In SDXC Reader",
        "manufacturer": "Apple",
        "identifier": null,
        "location": "Internal",
        "connector": "Secure Digital",
        "type": "Unknown",
        "vendor_id": null,
        "device_id": null,
        "size": null
      }
    ]
  },
  "graphics": {
    "status": {
      "type": "success",
      "messages": []
    },
    "modules": [
      {
        "name": "Apple M3 Pro",
        "vendor_id": "0x106b",
        "device_id": null,
        "manufacturer": "Apple Inc.",
        "subsystem_manufacturer": null,
        "subsystem_model": null,
        "acpi_path": null,
        "pci_path": null,
        "pcie_width": null,
        "pcie_gen": null,
        "vram": {
          "capacity": 18432,
          "unit": "MB"
        },
        "apple_gpu_info": {
          "gpu_core_count": 20,
          "performance_shader_count": 8,
          "gpu_gen": 15
        }
      }
    ]
  },
  "network": {
    "status": {
      "type": "success",
      "messages": []
    },
    "modules": [
      {
        "name": "Ethernet Adapter (en4)",
        "device_id": null,
        "vendor_id": null,
        "acpi_path": null,
        "pci_path": null,
        "manufacturer": null,
        "interface": "en4",
        "mac_address": "XX:XX:XX:XX:XX:XX",
        "type": "Ethernet",
        "ip_address": null
      },
      {
        "name": "Wi-Fi",
        "device_id": "0x4434",
        "vendor_id": "0x14e4",
        "acpi_path": null,
        "pci_path": null,
        "manufacturer": "Apple",
        "interface": "en0",
        "mac_address": "XX:XX:XX:XX:XX:XX",
        "type": "AirPort",
        "ip_address": "10.200.185.18"
      }
    ]
  }
}

Tracker

Hardware Discovery Progress Tracker

Component Linux macOS Windows
CPU
GPU
Memory
Network
Storage
-- -- - -
Display ❌* (1) ✅* (2)
Audio ✅* (2)
Motherboard
Vendor
Input
  1. In progress
  2. Need to rewrite C++ bindings (In progress)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hwprobe-0.0.1b2.tar.gz (778.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hwprobe-0.0.1b2-py3-none-any.whl (796.7 kB view details)

Uploaded Python 3

File details

Details for the file hwprobe-0.0.1b2.tar.gz.

File metadata

  • Download URL: hwprobe-0.0.1b2.tar.gz
  • Upload date:
  • Size: 778.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for hwprobe-0.0.1b2.tar.gz
Algorithm Hash digest
SHA256 021baf50bae12dfca9468aeb8402a7bf34ea52debd0c0fc0efbeb13ba313decb
MD5 4eea245677f2112baca1c42b1b6c61ee
BLAKE2b-256 d25e01279ee28010f7481da94874112151e4cfadf876a1bdd98ee2c35767649a

See more details on using hashes here.

File details

Details for the file hwprobe-0.0.1b2-py3-none-any.whl.

File metadata

  • Download URL: hwprobe-0.0.1b2-py3-none-any.whl
  • Upload date:
  • Size: 796.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for hwprobe-0.0.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 578445e8b68bda59ec1b6f140a802703474f984fa32d9df883a44c85f515b33a
MD5 f9ae19b98700642bdc8a141750eaab29
BLAKE2b-256 1bfb2c1ee50b23c4a998ad99e7ec4049c95caf82c8b51fd13b720d9db390e78f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page