Skip to main content

python library to parse the output of dmidecode

Project description

py-dmidecode

Small tool that parses output of dmidecode command

How to use

from dmidecode import DMIDecode
import subprocess

# create parsing instance by passing dmidecode output
dmi = DMIDecode()

# some of the pre-defined queries
print('Manufacturer:\t', dmi.manufacturer())
print('Model:\t\t', dmi.model())
print('Firmware:\t', dmi.firmware())
print('Serial number:\t', dmi.serial_number())
print('Processor type:\t', dmi.cpu_type())
print('Number of CPUs:\t', dmi.cpu_num())
print('Cores count:\t', dmi.total_enabled_cores())
print('Total RAM:\t{} GB'.format(dmi.total_ram()))

Alternatively instead of running dmidecode locally you can use DMIParse by passing dmidecode output as an argument:

from dmidecode import DMIParse
dmi = DMIParse(raw)

Other information can be easily retrieved by analyzing dmi.data and module code.

Possible limitations

Tested with dmidecode versions 2.11, 2.12 and 3.2

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

py_dmidecode-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

py_dmidecode-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file py_dmidecode-0.1.1.tar.gz.

File metadata

  • Download URL: py_dmidecode-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for py_dmidecode-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2f59b6a791cd17cd3d90391b3418d6fc7d5a1106c99928cc24a891edc4de442e
MD5 4646fa525c8afc0e5b05272cb932d7bf
BLAKE2b-256 a110def36b230951f538d73cfa891330b5c638b31b19c9dbd5a32f05d7b0f0e6

See more details on using hashes here.

Provenance

File details

Details for the file py_dmidecode-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: py_dmidecode-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for py_dmidecode-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72e99f018b000c4b2a9009d49ac68e1dc7f407740f3597416eb7e06c86a1acc8
MD5 1534b10d675910136efa69b7ca74a807
BLAKE2b-256 19613b6a75ff560a0da064f5164bd0b56ee4731cfdf6d1de583f5bb0eea943d2

See more details on using hashes here.

Provenance

Supported by

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