Skip to main content

Installing pyhidapi

pyhidapi is available on PyPI and can be installed using pip.

pip install hid

pyhidapi is dependant upon the hidapi library, which must be installed separately.

Installing hidapi

Linux

Installation procedures vary depending on your distribution.

Arch Linux

Binary distributions are available in the community repository.

  1. Enable the community repository in /etc/pacman.conf
[community]
Include = /etc/pacman.d/mirrorlist
  1. Install hidapi
pacman -Sy hidapi

CentOS/RHEL

Binary distributions are available through EPEL.

yum install hidapi

Fedora

Binary distributions are available.

dnf install hidapi

Ubuntu/Debian

Binary distributions are available.

apt install libhidapi-hidraw0

or

apt install libhidapi-libusb0

Others

Binary distributions may be available in your package repositories. If not, you can build from source as described in the libusb/hidapi README.

Windows

Installation procedure for Windows is described in the libusb/hidapi README

Binary distributions are provided by libusb/hidapi

OSX

There are currently no official binary distributions for Mac, so you must build hidapi yourself.

Installation instructions are described in the libusb/hidapi README

You can also use brew:

brew install hidapi

FreeBSD

Binary distributions are available.

pkg install -g 'py3*-hid'

Sample usage code

The details about a HID device can be printed with following code:

import hid

vid = 0x046d	# Change it for your device
pid = 0xc534	# Change it for your device

with hid.Device(vid, pid) as h:
	print(f'Device manufacturer: {h.manufacturer}')
	print(f'Product: {h.product}')
	print(f'Serial Number: {h.serial}')

Metadata

Release files for hid 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hid 1.0.9
File Size Uploaded Provenance Actions
hid-1.0.9.tar.gz 5.0 kB Without provenance Details for hid-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hid 1.0.9
File Interpreter ABI Platform Actions
hid-1.0.9-py3-none-any.whl Python 3 none any Details for hid-1.0.9-py3-none-any.whl

Total release size: 9.9 kB

Release files / hid-1.0.9.tar.gz

Download URL hid-1.0.9.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f4471f11f0e176d1b0cb1b243e55498cc90347a3aede735655304395694ac182
BLAKE2b-256 checksum
How to use checksums
e9f80357a8aa8874a243e96d08a8568efaf7478293e1a3441ddca18039b690c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / hid-1.0.9-py3-none-any.whl

Download URL hid-1.0.9-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b9289e00bbc1e1589bec0c7f376a63fe03a4a4a1875575d0ad60e3e11a349f4
BLAKE2b-256 checksum
How to use checksums
b8c7f0e1ad95179f44a6fc7a9140be025812cc7a62cf7390442b685a57ee1417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Security for hid 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page