python lib that parse the output of dmidecode
Project description
py-dmidecode
Small tool that parses ouput 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size py_dmidecode-0.1.0-py3-none-any.whl (8.2 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size py-dmidecode-0.1.0.tar.gz (4.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for py_dmidecode-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 670c42e77086689d716af519c185d267811c9978235ba7d1a52829b4699840c1 |
|
MD5 | f84ab571352308cc65a857b38098027d |
|
BLAKE2-256 | 7a2ff50b3a965afaa52ac6160c7ef905ebaebddf4f06ac6f5c44d46b62993993 |