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.3.tar.gz
(10.9 kB
view details)
Built Distribution
File details
Details for the file py_dmidecode-0.1.3.tar.gz
.
File metadata
- Download URL: py_dmidecode-0.1.3.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52d5f456b962e75ee3441985d4fe3d678c2f131d640e1db9d5385f7e735dc2c |
|
MD5 | ae200112f9df83e75314650d3fab0c69 |
|
BLAKE2b-256 | ab51d127a36b6196771b5b2573df81dbb9350a0e009cb675bfb95b72ab9cc177 |
File details
Details for the file py_dmidecode-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: py_dmidecode-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a507ee9ccb380ba7e6007264ab70bee3d66fde58d84f7a8b8d77e4a5e4fc3ef9 |
|
MD5 | a8de78ec981dbb1203895b20da2c541d |
|
BLAKE2b-256 | 1cfa4bbc787ce29494ea793702d57e638af23d031aebdb10bf25bcdce339488a |