Skip to main content

CPU, GPU, and NPU hardware topology and telemetry for Python.

Project description

mainboard banner

CI Publish PyPI Python Docs Coverage

Installation

pip install mainboard         # CPU and Apple probing, pure Python
pip install mainboard[cuda]   # adds NVIDIA telemetry via the CUDA Python bindings

Working in a chefe project? Add it to your manifest:

chefe add mainboard -l python

The base install is light and pure Python, so GPU-less Linux hosts like a Raspberry Pi pull nothing CUDA-related. The cuda extra installs the NVIDIA bindings on Linux for full GPU detection and telemetry, and provider detection degrades gracefully to no NVIDIA devices whenever the bindings or the hardware are absent.

What it is

mainboard tells Python what compute is on the current machine, without assuming the world is only CUDA. It models CPUs, GPUs, and NPUs as Units, keeps vendor-specific probing behind providers (Apple and NVIDIA today), and gives you the whole board in one call.

from mainboard import Machine

print(Machine().model_dump_json(indent=2))   # cpu, memory, gpus, npus, and the host environment

Usage

machine = Machine()
machine.cpu.snapshot()             # CPU identity and capacity
machine.gpus[0].snapshot()         # per-GPU telemetry
machine.environment                # user, group(s), and job scheduler on the host
machine.model_dump_json()          # one-call JSON probe of the whole machine

The CLI renders a Rich schematic of the board:

mainboard

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

mainboard-0.0.6.tar.gz (113.0 kB view details)

Uploaded Source

Built Distribution

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

mainboard-0.0.6-py3-none-any.whl (100.4 kB view details)

Uploaded Python 3

File details

Details for the file mainboard-0.0.6.tar.gz.

File metadata

  • Download URL: mainboard-0.0.6.tar.gz
  • Upload date:
  • Size: 113.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mainboard-0.0.6.tar.gz
Algorithm Hash digest
SHA256 72c24bf487c88497432853d90c08e742c2e5ff156e8f8f11ccbdbedffcd3367e
MD5 6ca8a066d995db36169c4d1b6d95e90a
BLAKE2b-256 be1c627cb336f1b60d0a17585e4bd143eb9f4b25edb1f0ba047e4ff9881166f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainboard-0.0.6.tar.gz:

Publisher: publish.yml on phvv-me/mainboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mainboard-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: mainboard-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 100.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mainboard-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4f5a16cc07ecc7230ba4d5fcb1735d1463f98209ac4b544808f1ddcf4671c218
MD5 974ab5796f6c0555c567109c51764aa7
BLAKE2b-256 6ff296f1b7c08fd0e8b86fd348ac09bd82b59879360d373cc2e751eb72549a58

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainboard-0.0.6-py3-none-any.whl:

Publisher: publish.yml on phvv-me/mainboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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