skillfed

pyusb

Easy USB access for Python

pyusb v1.3.1 4.7M downloads/30d#2,244 on PyPI2,308
Permissive license AGING released

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 pyusb

uv

uv add pyusb

poetry

poetry add pyusb

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: ManufacturingIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: Windows :: Windows 10Operating System :: Microsoft :: Windows :: Windows 7Operating System :: Microsoft :: Windows :: Windows VistaOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: BSD :: NetBSDOperating System :: POSIX :: BSD :: OpenBSDOperating System :: POSIX :: LinuxOperating System :: POSIX :: SunOS/SolarisProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: IronPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: Interface Engine/Protocol TranslatorTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Hardware :: Hardware Drivers

Tags

usb device communication pythonlibusb python wrapperusb hardware controlpython usb interfaceusb device enumerationhost usb accessusb protocol python
usb-hardwareembedded-systemscross-platform

More Libraries packages