pyusb
Easy USB access for Python
What it is and what it does
PyUSB is a Python library that abstracts USB communication on the host machine, providing an API to enumerate, identify, and interact with USB devices. It wraps platform-specific USB backends (libusb 1.0 is recommended) and handles low-level USB protocol details, allowing developers to focus on device logic rather than system-level mechanics.
The library supports Python >= 3.9 and runs on Linux, macOS, Windows, BSD, and other POSIX systems. It has no Python runtime dependencies, making installation lightweight. However, it requires a native libusb library to be present on the system—a system-level dependency that varies by platform and must be installed separately before the package can function.
Use it for:
- Enumerate and identify USB devices connected to the host, then read device metadata like vendor ID and product ID.
- Communicate with custom USB hardware (microcontrollers, test equipment, embedded devices) by sending and receiving data over endpoints.
- Build cross-platform tools that interact with USB peripherals without writing platform-specific code for each operating system.
- Debug USB device behavior by reading descriptors and monitoring USB traffic from Python.
- Integrate USB device control into larger Python applications for robotics, scientific instruments, or industrial automation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyUSB provides Python access to USB devices on the host machine through a backend-neutral API, supporting libusb 1.0, libusb 0.1, and OpenUSB backends.
Yes, if you need to interact with USB devices from Python and are willing to install the required libusb system library. PyUSB is stable, permissively licensed, has no Python dependencies, and is widely used in hardware automation and embedded systems work. The aging maintenance status is not a blocker for established use cases, but verify that your specific USB devices are supported before committing to it.
Install
pyusb on PyPI
pip
pip install pyusbuv
uv add pyusbpoetry
poetry add pyusbInstalling pyusb
Before you install
Installation is straightforward via pip with no runtime dependencies. The package is aging (583 days since last release) but remains in production/stable status with an active repository and recent commits.
License in practice
Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions beyond attribution.
Quickstart
pip install pyusb
import pyusb
devices = pyusb.core.find(find_all=True)
for dev in devices:
print(dev)
Requires libusb 1.0 (or libusb 0.1/OpenUSB) installed on the system; on Windows, the libusb DLL must be manually installed or packaged with your application.
Verify before relying
- Whether the aging maintenance status (583 days since release) affects stability or security posture for new USB device types.
- Specific performance characteristics when enumerating or communicating with large numbers of USB devices.
- Compatibility with specific USB device types and protocols beyond the documented backends.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 583 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,723,139/month — #2,244 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyusb-1.3.1-py3-none-any.whl
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
libusb-packageBundles libusb shared libraries for multiple…
permissive · top 5,000 on PyPI
libusb1Python wrapper for libusb-1.0 that enables…
copyleft · top 15,000 on PyPI
hidapiProvides a Python interface to HIDAPI, enabling…
unclear · top 5,000 on PyPI
binho-host-adapterControls Binho Multi-Protocol USB Host Adapters…
permissive · top 15,000 on PyPI
hidProvides Python bindings to the hidapi library…
permissive · top 15,000 on PyPI
libusbsioProvides a Python wrapper around NXP's…
permissive · top 15,000 on PyPI
brainstemProvides Python bindings to control and…
unclear · top 15,000 on PyPI
pylibftdiPythonic interface to FTDI USB devices via…
permissive · top 15,000 on PyPI
PyVISA-pyPyVISA-py is a pure Python backend for the VISA…
permissive · top 5,000 on PyPI
pyu2fpyu2f provides U2F (Universal 2nd Factor)…
permissive · top 15,000 on PyPI