libpci
Pure-Python, high-level bindings to libpci
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 libpciuv
uv add libpcipoetry
poetry add libpciInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pylspciParses the output of the lspci command to…
copyleft · top 15,000 on PyPI
winrt-Windows.Devices.EnumerationProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
mac-vendor-lookupResolves MAC addresses to vendor names using a…
permissive · top 15,000 on PyPI
bluetooth-adaptersEnumerates and locates Bluetooth adapters on a…
permissive · top 15,000 on PyPI
pyudevpyudev is a pure Python binding for libudev…
copyleft · top 5,000 on PyPI
pyprctlProvides a pure-Python interface to Linux's…
permissive · top 15,000 on PyPI
nixl-cu13NIXL provides Python bindings to accelerate…
permissive · top 15,000 on PyPI
shiboken2Shiboken2 provides Python access to metadata…
copyleft · top 15,000 on PyPI
nixl-cu12NIXL provides Python bindings to accelerate…
permissive · top 15,000 on PyPI