--- id: hid version: "1.0.9" license: MIT license_treatment: permissive maintenance: aging --- # hid — ctypes bindings for hidapi License: permissive · Maintenance: aging · Downloads: 80.2K/mo ## 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 above — verify before relying. Provides Python bindings to the hidapi library for communicating with USB human interface devices (keyboards, mice, joysticks, etc.) at a low level. 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 pip install hid uv add hid poetry add hid ## Installing hid 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. 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}') 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). 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 80.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags USB HID device communication, human interface device control, hidapi python bindings, low-level USB device access, HID device enumeration, keyboard mouse joystick control, usb-hid, hardware-control [View on SkillFed](https://skillfed.io/packages/hid) · [View on PyPI](https://pypi.org/project/hid/)