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.
- Enable the community repository in
/etc/pacman.conf
[community]
Include = /etc/pacman.d/mirrorlist
- 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
It should be noted that at this time, brew still uses the old signal11 repository which has long since been abandond. See Homebrew/homebrew-core#41122.
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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hid-1.0.4.tar.gz | 3.9 kB | Without provenance | Details for hid-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hid-1.0.4-py2-none-any.whl | Python 2 | none | any | Details for hid-1.0.4-py2-none-any.whl |
Total release size: 7.8 kB
Release files / hid-1.0.4.tar.gz
| Download URL | hid-1.0.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f61b0382f37a334bc8ba8604bc84b94875ee4f594fbbaf82b2c3b3e827883fc1
|
|
BLAKE2b-256 checksum How to use checksums |
96bae1923a3f7f865cd9f3c388bf6a42b4ed149ae1a00e68f71eec49ea3d3da4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|
Release files / hid-1.0.4-py2-none-any.whl
| Download URL | hid-1.0.4-py2-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
fba9913f07030b01059b822b24c83b370ca3f444e9e6443bd662f9f1aa3f0780
|
|
BLAKE2b-256 checksum How to use checksums |
b35c76d7423965942242206a49aeb391874efb3fb6feff2b18c49d1977d348cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
|
Security for hid 1.0.4
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.