skillfed

pylspci

Simple parser for lspci -mmnn.

pylspci v0.4.3 190.0K downloads/30d#9,916 on PyPI
Copyleft license GNU General Public License 3 Abandoned released

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 pylspci

uv

uv add pylspci

poetry

poetry add pylspci

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: System :: HardwareTopic :: UtilitiesTyping :: Typed

Tags

lspci parserpci device informationparse lspci outputhardware device enumerationpci bus parsingsystem hardware inventory
hardware-enumerationsystem-tools

More Libraries packages