skillfed

hidapi

A Cython interface to the hidapi from https://github.com/libusb/hidapi

hidapi v0.15.0 1.3M downloads/30d#4,141 on PyPI324
License unclear Active released

What it is and what it does

hidapi is a Cython binding to the HIDAPI library, allowing Python code to discover and communicate with USB human interface devices like keyboards, mice, game controllers, and custom hardware. It abstracts platform-specific details of HID communication on Linux, Windows, and macOS into a unified interface.

The package has been tested with TREZOR hardware wallets, PIC18F4550 development boards, and weather station devices. Installation requires system-level USB libraries and headers; pre-built wheels are available for Python 3.10, 3.11, 3.12, 3.13, 3.14 across multiple platforms. The library is actively maintained with no known security vulnerabilities.

Use it for:

  • Communicate with TREZOR or other hardware wallets from Python applications
  • Read sensor data from USB-connected weather stations or environmental monitors
  • Control custom USB devices or embedded boards from Python
  • Enumerate and interact with game controllers or input devices
  • Build cross-platform tools requiring direct USB HID access without OS-specific code

Worth the install?

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

Provides a Python interface to HIDAPI, enabling communication with USB human interface devices across Linux, Windows, and macOS.

Yes, if you need to communicate with USB HID devices from Python. The package is actively maintained, has no known vulnerabilities, and supports Python 3.10–3.14 across Linux, Windows, and macOS. Install friction is moderate due to system library dependencies, but pre-built wheels ease setup. License treatment is unclear—verify LICENSE.txt against your project's requirements before use.

Install

hidapi on PyPI

pip

pip install hidapi

uv

uv add hidapi

poetry

poetry add hidapi

Installing hidapi

Before you install

Medium install friction: requires pre-installed system libraries (libusb-1.0-0-dev and libudev-dev on Linux). Actively maintained as of 2026-03-15 with 324 repository stars and no known vulnerabilities.

License in practice

License treatment is unclear: classifiers list BSD and GPLv3 options, but neither SPDX nor raw license metadata is available in the package record. Review LICENSE.txt in the repository before use in proprietary or GPL-incompatible projects.

Quickstart

pip install hidapi

import hidapi

Requires system libraries: on Linux, install libusb-1.0-0-dev and libudev-dev; on Windows and macOS, pre-built wheels are available for Python 3.10, 3.11, 3.12, 3.13, 3.14.

Verify before relying

  • Exact API surface and method signatures available after import
  • Whether udev rules configuration is required for all use cases or only specific hardware
  • Runtime behavior differences between hidraw and libusb backends on Linux

Package facts

License not declared (unclear)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 248 days since the last release
Last repo commit
First released
Downloads 1,266,055/month — #4,141 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hidapi-0.15.0-cp310-cp310-macosx_10_9_x86_64.whl; hidapi-0.15.0-cp310-cp310-macosx_11_0_arm64.whl; hidapi-0.15.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; hidapi-0.15.0-cp310-cp310-manylinux_2_28_aarch64.whl; hidapi-0.15.0-cp310-cp310-manylinux_2_28_i686.whl; hidapi-0.15.0-cp310-cp310-musllinux_1_2_aarch64.whl; hidapi-0.15.0-cp310-cp310-musllinux_1_2_i686.whl; hidapi-0.15.0-cp310-cp310-musllinux_1_2_x86_64.whl; hidapi-0.15.0-cp310-cp310-win32.whl; hidapi-0.15.0-cp310-cp310-win_amd64.whl; hidapi-0.15.0-cp311-cp311-macosx_10_9_x86_64.whl; hidapi-0.15.0-cp311-cp311-macosx_11_0_arm64.whl; hidapi-0.15.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; hidapi-0.15.0-cp311-cp311-manylinux_2_28_aarch64.whl; hidapi-0.15.0-cp311-cp311-manylinux_2_28_i686.whl; hidapi-0.15.0-cp311-cp311-musllinux_1_2_aarch64.whl; hidapi-0.15.0-cp311-cp311-musllinux_1_2_i686.whl; hidapi-0.15.0-cp311-cp311-musllinux_1_2_x86_64.whl; hidapi-0.15.0-cp311-cp311-win32.whl; hidapi-0.15.0-cp311-cp311-win_amd64.whl

License :: OSI Approved :: BSD LicenseLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

USB HID device communicationhuman interface device Pythonhidapi Python bindingUSB device control libraryhardware device interfaceUSB peripheral accesscross-platform USB control
usb-hardwaredevice-communicationcross-platform

More Software Development packages