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

# 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.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

py_dmidecode-0.1.2-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_dmidecode-0.1.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for py_dmidecode-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9cccbf8ce960ef250f7c6176ecc37437254cd2fb93201b894d5d8628d3f5dd40
MD5 879aeb232d8df7ebb44907581c3bd832
BLAKE2b-256 edf226d3b983b8dedf54c82723bb180ed83df470f5ab9f14e44069ee235b4a33

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: py_dmidecode-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for py_dmidecode-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4530629f4d6b7869450fe24179dcaf2477e4d6ac92f4baf384a32a974f6d652
MD5 6b212e4eb698c76635f1655c135bd6b7
BLAKE2b-256 be3269a8d625a947761212bcfd14c8b9a5b02760e779acc174fc2ccc69081618

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