hidapi
A Cython interface to the hidapi from https://github.com/libusb/hidapi
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 hidapiuv
uv add hidapipoetry
poetry add hidapiInstalling 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
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
hidProvides Python bindings to the hidapi library…
permissive · top 15,000 on PyPI
phidget22Phidget22 is the official Python library for…
permissive · top 15,000 on PyPI
pyusbPyUSB provides Python access to USB devices on…
permissive · top 5,000 on PyPI
libusb1Python wrapper for libusb-1.0 that enables…
copyleft · top 15,000 on PyPI
spidevProvides Python bindings to interact with SPI…
permissive · top 15,000 on PyPI
libusbsioProvides a Python wrapper around NXP's…
permissive · top 15,000 on PyPI
pyudevpyudev is a pure Python binding for libudev…
copyleft · top 5,000 on PyPI
ft4222Provides Python bindings to LibFT4222, enabling…
permissive · top 15,000 on PyPI
pyjoulescope-driverPython bindings for the Joulescope DC energy…
permissive · top 15,000 on PyPI
pyghmiPyghmi provides Python bindings for IPMI…
permissive · top 15,000 on PyPI