hid
ctypes bindings for hidapi
Decision gist · record as of 2026-08-14
Yes, if you need to work with USB HID devices and are comfortable installing the hidapi system library separately. The package is stable (MIT licensed, no known vulnerabilities, low install friction), though maintenance is aging—last release was 190 days ago. It is the standard Python binding for hidapi and has modest but steady adoption. Not suitable if you cannot install native system libraries or need active development support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- The hidapi C library must be installed on your system before importing hid (e.g., apt install libhidapi-hidraw0 on Ubuntu, brew install hidapi on macOS, or built from source on some platforms).
- Low install friction—pure Python wheel with no runtime dependencies.
- However, the underlying hidapi C library must be installed separately on your system before the package is useful, which adds a platform-specific setup step outside pip.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
last release 2026-02-05 (190 days) · last repo commit 2026-02-05 · 140 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,150 downloads/mo, #14,316 on PyPI
Alternatives
Verify before relying
pip install hid
import hid
vid = 0x046d # Your device's vendor ID
pid = 0xc534 # Your device's product ID
with hid.Device(vid, pid) as h:
print(f'Device: {h.product}')
print(f'Manufacturer: {h.manufacturer}')- Whether the package works with all Python 3.x versions or has undocumented constraints.
- Current state of compatibility with modern hidapi versions and whether breaking changes are tracked.
What it is and what it does
This package wraps the hidapi C library with ctypes bindings, allowing Python code to enumerate, open, and communicate with USB human interface devices like keyboards, mice, and game controllers. It is typically used in applications that need direct, low-level access to HID devices for custom control or data collection.
The package itself has no Python runtime dependencies and installs as a pure wheel, but it requires the hidapi library to be installed separately on your system—a prerequisite that varies by operating system and distribution. Once both are in place, you can query device properties and send/receive data through a simple context-manager interface.
Use it for
- Read input from custom USB game controllers or joysticks in real-time applications.
- Enumerate and communicate with USB peripherals for hardware testing or diagnostics.
- Build cross-platform tools that control USB HID devices like programmable keyboards or LED controllers.
- Capture raw HID reports from devices for protocol reverse-engineering or data logging.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to work with USB HID devices and are comfortable installing the hidapi system library separately.
The package is stable (MIT licensed, no known vulnerabilities, low install friction), though maintenance is aging—last release was 190 days ago. It is the standard Python binding for hidapi and has modest but steady adoption. Not suitable if you cannot install native system libraries or need active development support.
Install
hid on PyPI
Before you install
Low install friction—pure Python wheel with no runtime dependencies. However, the underlying hidapi C library must be installed separately on your system before the package is useful, which adds a platform-specific setup step outside pip.
The hidapi C library must be installed on your system before importing hid (e.g., apt install libhidapi-hidraw0 on Ubuntu, brew install hidapi on macOS, or built from source on some platforms).
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
Quickstart
pip install hid
import hid
vid = 0x046d # Your device's vendor ID
pid = 0xc534 # Your device's product ID
with hid.Device(vid, pid) as h:
print(f'Device: {h.product}')
print(f'Manufacturer: {h.manufacturer}')
Verify before relying
- Whether the package works with all Python 3.x versions or has undocumented constraints.
- Current state of compatibility with modern hidapi versions and whether breaking changes are tracked.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 190 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,150 / month, #14,316 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 |
Evidence: hid-1.0.9-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “USB HID device communication”
- hidProvides Python bindings to the hidapi library for communicating with…
- hidapiProvides a Python interface to HIDAPI, enabling communication with…
- libusbsioProvides a Python wrapper around NXP's libusbsio binary library to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also hidapi · phidget22 · brainstem · pyusb · inputs · usb-devices · libusb-package · pyftdi · libusb1 · binho-host-adapter