skillfed

libpci

Pure-Python, high-level bindings to libpci

libpci v0.2 88.2K downloads/30d#13,741 on PyPI8
Copyleft license LGPLv3 Abandoned released

What it is and what it does

libpci is a pure-Python wrapper around the libpci C library, giving you high-level access to PCI device and vendor name lookups. It was designed to simplify querying hardware information on Linux systems through both a command-line interface and programmatic APIs. The package has no runtime dependencies and installs cleanly, but it has been abandoned since 2015-04-24 and was only ever tested against Python 3.4, so its behavior on modern Python versions is unknown.

The library provides methods to look up device names, vendor names, and subsystem device names by their numeric identifiers. It exposes this functionality through sub-commands (pci-lookup, subsystem-device) for CLI use and through a LibPCI class for programmatic access. Because it wraps a system C library, you must have libpci installed on your system for it to work.

Use it for:

  • Query PCI device vendor and model names from their numeric IDs in a Linux system administration script.
  • Build hardware inventory tools that need to resolve PCI device identifiers to human-readable names.
  • Integrate PCI device lookup into diagnostic or monitoring utilities that run on Linux.
  • Automate hardware detection workflows where you have PCI IDs but need vendor/device metadata.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to libpci, allowing you to query PCI device and vendor information from the command line or programmatically.

No. The package is abandoned (last commit 2015-04-24) and only tested against Python 3.4, making compatibility with modern Python versions uncertain. While it has no runtime dependencies and low install friction, the lack of maintenance, unverified Python support, and Alpha status mean you should seek an actively maintained alternative or verify it works in your specific environment before relying on it.

Install

libpci on PyPI

pip

pip install libpci

uv

uv add libpci

poetry

poetry add libpci

Installing libpci

Before you install

Low install friction with no runtime dependencies, but the package is abandoned—last updated 2015-04-24 with no commits since. It targets Python 3.4 and is classified as Alpha, so compatibility with modern Python versions is unverified.

License in practice

Licensed under LGPLv3 (copyleft), which requires that derivative works and modifications remain under the same license; acceptable for many projects but imposes distribution obligations if you modify and redistribute the code.

Quickstart

pip install libpci

from libpci import LibPCI
libpci = LibPCI()
device_name = libpci.lookup_device_name(vendor_id, device_id)

Requires libpci system library to be installed; Python version compatibility beyond 3.4 is unverified.

Verify before relying

  • Whether the package works with Python versions beyond 3.4 despite no recent maintenance or testing.
  • Whether the underlying libpci system library is available and compatible on current Linux distributions.
  • Current state of the command-line interface (pci-lookup, subsystem-device sub-commands) and whether it matches the 0.2 release description.

Package facts

License LGPLv3 (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 4,130 days since the last release
Last repo commit
First released
Downloads 88,212/month — #13,741 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: libpci-0.2-py3-none-any.whl

Keywords: libpci, binding

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Natural Language :: EnglishOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: Implementation :: CPythonTopic :: Software DevelopmentTopic :: Software Development :: Libraries

Tags

pci device lookup pythonlibpci bindingspci vendor informationhardware device enumerationpci subsystem querypython pci tools
pci-hardwareabandoned

More Software Development packages