{"id":27700,"library":"dmiparser","title":"dmiparser","description":"A library to parse dmidecode output into JSON text. Current version 5.1. Project appears to be in maintenance mode with infrequent releases.","status":"maintenance","version":"5.1","language":"python","source_language":"en","source_url":"https://github.com/Arondight/python-dmiparser","tags":["dmidecode","parse","json","system-information"],"install":[{"cmd":"pip install dmiparser","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"The package name and module name differ; use correct import path.","wrong":"import dmiparser","symbol":"dmiparser","correct":"from dmiparser import dmiparser"}],"quickstart":{"code":"from dmiparser import dmiparser\nimport subprocess, json\n\n# Get dmidecode output (requires root)\ntry:\n    output = subprocess.check_output(['dmidecode'], stderr=subprocess.STDOUT).decode()\nexcept Exception as e:\n    output = \"\"  # fallback if dmidecode not available\n\nparser = dmiparser.DMIParser()\nresult = parser.parse_text(output)\nprint(json.dumps(result, indent=2))","lang":"python","description":"Parse raw dmidecode output to JSON."},"warnings":[{"fix":"Use correct import: from dmiparser import dmiparser","message":"Import path is confusing: the PyPI package is 'dmiparser', but the module to import is also 'dmiparser'. Use 'from dmiparser import dmiparser'.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure dmidecode is installed and run with sudo, or capture output from a file.","message":"Parsing via dmidecode requires root privileges. If the command is not available or fails, the parser will receive empty input.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install: pip install dmiparser, then import: from dmiparser import dmiparser","cause":"Incorrect import path or package not installed.","error":"ModuleNotFoundError: No module named 'dmiparser'"},{"fix":"Use correct import: from dmiparser import dmiparser, then dmiparser.DMIParser()","cause":"Using import dmiparser instead of from dmiparser import dmiparser.","error":"AttributeError: module 'dmiparser' has no attribute 'DMIParser'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}