pylspci
Simple parser for lspci -mmnn.
What it is and what it does
pylspci is a Python parser that takes the text output of the lspci command (from the pciutils package) and converts it into structured, queryable Python objects. It handles the machine-readable -mmnn format and lets you programmatically inspect PCI bus devices, their IDs, and properties without manual string parsing.
The package is a small, focused library with minimal dependencies—only cached-property at runtime. It was last released in August 2022 and is now abandoned, meaning no new features or bug fixes are forthcoming. It remains useful for stable, read-only tasks like enumerating hardware on systems where lspci is available, but should not be relied upon for evolving requirements or in production environments where maintenance matters.
Use it for:
- Enumerate PCI devices programmatically in system administration or hardware inventory scripts.
- Parse lspci output in automated testing or hardware validation workflows.
- Build device lookup tables or reports from raw lspci command output in Python applications.
- Inspect PCI device IDs and vendor information without shell-parsing lspci text manually.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses the output of the lspci command to extract and structure PCI device information from the pciutils package.
Yes, if you need to parse lspci output in Python and accept that the package is unmaintained. The code is stable for its narrow scope, has no known vulnerabilities, and low install friction. No, if you require active maintenance, bug fixes, or support for evolving hardware standards—the 1471-day gap since the last release and abandoned status are significant red flags for production use.
Install
pylspci on PyPI
pip
pip install pylspciuv
uv add pylspcipoetry
poetry add pylspciInstalling pylspci
Before you install
Low install friction with a single lightweight dependency (cached-property). However, the package is abandoned—last release was 2022-08-04, over 1471 days ago—so no maintenance or bug fixes should be expected.
License in practice
Licensed under GPLv3 (copyleft). Any derivative work or bundled distribution must also be open-source under compatible terms; proprietary projects should review licensing implications before use.
Quickstart
pip install pylspci
import pylspci
parser = pylspci.Parser()
devices = parser.parse_output(lspci_output_string)
Requires lspci command-line tool from pciutils to be installed on the system; pylspci only parses its output, it does not provide the data itself.
Verify before relying
- Whether the parser handles all lspci output formats and edge cases reliably, given the package is no longer maintained.
- Compatibility with recent versions of pciutils and modern hardware PCI configurations.
Package facts
| License | GNU General Public License 3 (copyleft) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — cached-property |
| Maintenance | abandoned — 1,471 days since the last release |
| First released | |
| Downloads | 190,033/month — #9,916 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylspci-0.4.3-py3-none-any.whl
Keywords: lspci, parser
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
libpciProvides Python bindings to libpci, allowing…
copyleft · top 15,000 on PyPI
spidevProvides Python bindings to interact with SPI…
permissive · top 15,000 on PyPI
blkinfoRetrieves structured information about block…
copyleft · top 15,000 on PyPI
PyRICPyRIC provides programmatic control over Linux…
copyleft · top 15,000 on PyPI
libusbsioProvides a Python wrapper around NXP's…
permissive · top 15,000 on PyPI
cpeParses, compares, and evaluates Common Platform…
copyleft · top 15,000 on PyPI
svqlParses SystemVerilog modules and exposes their…
permissive · top 15,000 on PyPI
ldfparserParses LIN Description Files (LDF) to extract…
permissive · top 5,000 on PyPI
hidapiProvides a Python interface to HIDAPI, enabling…
unclear · top 5,000 on PyPI
textfsmTextFSM parses semi-structured text (like CLI…
permissive · top 5,000 on PyPI