Skip to main content

ctypes bindings for hidapi

Project description

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}')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hid-1.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hid-1.0.5-py2-none-any.whl (4.6 kB view details)

Uploaded Python 2

File details

Details for the file hid-1.0.5.tar.gz.

File metadata

  • Download URL: hid-1.0.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/2.7.15+

File hashes

Hashes for hid-1.0.5.tar.gz
Algorithm Hash digest
SHA256 1e954e7f7ab9b7c9dfc78db59504692c17db3b71249492b976b1525b97dbb0e8
MD5 44a0f558aed0c6ff4ac7cb92a2c76478
BLAKE2b-256 e02a87d8d87343c9be4f839972b0a3bef66b8b4f0d350cda11f2d3d8222f29ab

See more details on using hashes here.

File details

Details for the file hid-1.0.5-py2-none-any.whl.

File metadata

  • Download URL: hid-1.0.5-py2-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/2.7.15+

File hashes

Hashes for hid-1.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 11836b877e81ab68cdd3abc44f2e230f0e6146c7e17ac45c185b72e0159fc9c7
MD5 5dd15966bacfdcf4a92e8581d1ef7c98
BLAKE2b-256 d62dd5024f2f827f669b9e643ae2fd435af35f79922a35096ecc4a247d45832c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page