hidapi 0.14.0.post4


pip install hidapi

  Latest version

Released: Nov 19, 2024

Project Links

Meta
Author: Pavol Rusnak
Maintainer: Pavol Rusnak

Classifiers

Operating System
  • MacOS :: MacOS X
  • Microsoft :: Windows
  • POSIX

License
  • OSI Approved :: BSD License
  • OSI Approved :: GNU General Public License v3 (GPLv3)

Programming Language
  • Python :: 3.5
  • Python :: 3.6
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9

Description

A Cython interface to HIDAPI library.

This has been tested with:

  • TREZOR Hardware Wallet

  • the PIC18F4550 on the development board from CCS with their example program

  • the Fine Offset WH3081 Weather Station

It works on Linux, Windows and macOS.

Software Dependencies

License

cython-hidapi may be used by one of three licenses as outlined in LICENSE.txt

Install

$ sudo apt-get install python-dev libusb-1.0-0-dev libudev-dev
$ sudo pip install --upgrade setuptools
$ sudo pip install hidapi

For other download options visit the PyPi page.

Build from source

  1. Download cython-hidapi archive:

    $ git clone --recursive https://github.com/trezor/cython-hidapi.git
    $ cd cython-hidapi
  2. Build cython-hidapi extension module:

    $ python setup.py build

    On Linux, the hidraw API is now used by default, and the libusb API is not included. That is, –without-libusb is now the default behavior. To force the use of the libusb API instead, use the –with-libusb option:

    $ python setup.py build --with-libusb

    Or you can also use the environment variable:

    $ export HIDAPI_WITH_LIBUSB=1
    $ python setup.py build
  3. Install cython-hidapi module into your Python distribution:

    $ sudo python setup.py install

    Alternatively, you can run pip directly, which will call the necessary build and install commands:

    $ pip install -e .
  4. Test install:

    $ python
    >>> import hid
    >>>
  5. Try example script:

    $ python try.py

Udev rules

For correct functionality under Linux, you need to create a rule file similar to this one in your udev rules directory.

Also you might need to call udevadm control --reload-rules to reload the rules.

Documentation

Documentation can be built using Sphinx:

$ cd docs && make html

The HTML output will be in docs/_build/html.

The documentation is extracted from the code using autodoc.

Note that the build output is used. So rebuilt the package before generating documentation.

Built documentation is also deployed to: https://trezor.github.io/cython-hidapi/.

Wheel compatibility matrix

Platform CPython 3.6 CPython 3.7 CPython 3.8 CPython 3.9 CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13
macosx_10_13_x86_64
macosx_10_9_x86_64
macosx_11_0_arm64
manylinux2014_aarch64
manylinux2014_i686
manylinux2014_x86_64
manylinux_2_17_aarch64
manylinux_2_17_i686
manylinux_2_17_x86_64
musllinux_1_2_aarch64
musllinux_1_2_i686
musllinux_1_2_x86_64
win32
win_amd64

Files in release

hidapi-0.14.0.post4-cp310-cp310-macosx_10_9_x86_64.whl (68.7KiB)
hidapi-0.14.0.post4-cp310-cp310-macosx_11_0_arm64.whl (66.5KiB)
hidapi-0.14.0.post4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1002.3KiB)
hidapi-0.14.0.post4-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (1002.4KiB)
hidapi-0.14.0.post4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (994.7KiB)
hidapi-0.14.0.post4-cp310-cp310-musllinux_1_2_aarch64.whl (619.6KiB)
hidapi-0.14.0.post4-cp310-cp310-musllinux_1_2_i686.whl (609.1KiB)
hidapi-0.14.0.post4-cp310-cp310-musllinux_1_2_x86_64.whl (631.9KiB)
hidapi-0.14.0.post4-cp310-cp310-win32.whl (61.6KiB)
hidapi-0.14.0.post4-cp310-cp310-win_amd64.whl (68.7KiB)
hidapi-0.14.0.post4-cp311-cp311-macosx_10_9_x86_64.whl (69.4KiB)
hidapi-0.14.0.post4-cp311-cp311-macosx_11_0_arm64.whl (67.1KiB)
hidapi-0.14.0.post4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0MiB)
hidapi-0.14.0.post4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (1.0MiB)
hidapi-0.14.0.post4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0MiB)
hidapi-0.14.0.post4-cp311-cp311-musllinux_1_2_aarch64.whl (666.6KiB)
hidapi-0.14.0.post4-cp311-cp311-musllinux_1_2_i686.whl (654.1KiB)
hidapi-0.14.0.post4-cp311-cp311-musllinux_1_2_x86_64.whl (680.3KiB)
hidapi-0.14.0.post4-cp311-cp311-win32.whl (61.5KiB)
hidapi-0.14.0.post4-cp311-cp311-win_amd64.whl (68.7KiB)
hidapi-0.14.0.post4-cp312-cp312-macosx_10_13_x86_64.whl (70.0KiB)
hidapi-0.14.0.post4-cp312-cp312-macosx_11_0_arm64.whl (67.5KiB)
hidapi-0.14.0.post4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0MiB)
hidapi-0.14.0.post4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (1.0MiB)
hidapi-0.14.0.post4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0MiB)
hidapi-0.14.0.post4-cp312-cp312-musllinux_1_2_aarch64.whl (678.2KiB)
hidapi-0.14.0.post4-cp312-cp312-musllinux_1_2_i686.whl (666.6KiB)
hidapi-0.14.0.post4-cp312-cp312-musllinux_1_2_x86_64.whl (685.2KiB)
hidapi-0.14.0.post4-cp312-cp312-win32.whl (61.6KiB)
hidapi-0.14.0.post4-cp312-cp312-win_amd64.whl (68.8KiB)
hidapi-0.14.0.post4-cp313-cp313-macosx_10_13_x86_64.whl (68.7KiB)
hidapi-0.14.0.post4-cp313-cp313-macosx_11_0_arm64.whl (66.4KiB)
hidapi-0.14.0.post4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0MiB)
hidapi-0.14.0.post4-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (1.0MiB)
hidapi-0.14.0.post4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0MiB)
hidapi-0.14.0.post4-cp313-cp313-musllinux_1_2_aarch64.whl (681.8KiB)
hidapi-0.14.0.post4-cp313-cp313-musllinux_1_2_i686.whl (655.8KiB)
hidapi-0.14.0.post4-cp313-cp313-musllinux_1_2_x86_64.whl (687.4KiB)
hidapi-0.14.0.post4-cp313-cp313-win32.whl (61.2KiB)
hidapi-0.14.0.post4-cp313-cp313-win_amd64.whl (68.1KiB)
hidapi-0.14.0.post4-cp36-cp36m-macosx_10_9_x86_64.whl (67.5KiB)
hidapi-0.14.0.post4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (935.2KiB)
hidapi-0.14.0.post4-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl (937.5KiB)
hidapi-0.14.0.post4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.1KiB)
hidapi-0.14.0.post4-cp36-cp36m-musllinux_1_2_aarch64.whl (562.3KiB)
hidapi-0.14.0.post4-cp36-cp36m-musllinux_1_2_i686.whl (558.6KiB)
hidapi-0.14.0.post4-cp36-cp36m-musllinux_1_2_x86_64.whl (572.1KiB)
hidapi-0.14.0.post4-cp36-cp36m-win32.whl (65.7KiB)
hidapi-0.14.0.post4-cp36-cp36m-win_amd64.whl (75.6KiB)
hidapi-0.14.0.post4-cp37-cp37m-macosx_10_9_x86_64.whl (69.6KiB)
hidapi-0.14.0.post4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (948.2KiB)
hidapi-0.14.0.post4-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (950.5KiB)
hidapi-0.14.0.post4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (944.8KiB)
hidapi-0.14.0.post4-cp37-cp37m-musllinux_1_2_aarch64.whl (582.3KiB)
hidapi-0.14.0.post4-cp37-cp37m-musllinux_1_2_i686.whl (565.2KiB)
hidapi-0.14.0.post4-cp37-cp37m-musllinux_1_2_x86_64.whl (592.0KiB)
hidapi-0.14.0.post4-cp37-cp37m-win32.whl (61.9KiB)
hidapi-0.14.0.post4-cp37-cp37m-win_amd64.whl (69.1KiB)
hidapi-0.14.0.post4-cp38-cp38-macosx_10_9_x86_64.whl (69.7KiB)
hidapi-0.14.0.post4-cp38-cp38-macosx_11_0_arm64.whl (67.3KiB)
hidapi-0.14.0.post4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1004.7KiB)
hidapi-0.14.0.post4-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (1005.6KiB)
hidapi-0.14.0.post4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (999.5KiB)
hidapi-0.14.0.post4-cp38-cp38-musllinux_1_2_aarch64.whl (630.8KiB)
hidapi-0.14.0.post4-cp38-cp38-musllinux_1_2_i686.whl (618.8KiB)
hidapi-0.14.0.post4-cp38-cp38-musllinux_1_2_x86_64.whl (640.7KiB)
hidapi-0.14.0.post4-cp38-cp38-win32.whl (62.2KiB)
hidapi-0.14.0.post4-cp38-cp38-win_amd64.whl (69.4KiB)
hidapi-0.14.0.post4-cp39-cp39-macosx_10_9_x86_64.whl (69.4KiB)
hidapi-0.14.0.post4-cp39-cp39-macosx_11_0_arm64.whl (67.1KiB)
hidapi-0.14.0.post4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1009.6KiB)
hidapi-0.14.0.post4-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (1008.5KiB)
hidapi-0.14.0.post4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1000.9KiB)
hidapi-0.14.0.post4-cp39-cp39-musllinux_1_2_aarch64.whl (625.6KiB)
hidapi-0.14.0.post4-cp39-cp39-musllinux_1_2_i686.whl (614.9KiB)
hidapi-0.14.0.post4-cp39-cp39-musllinux_1_2_x86_64.whl (636.0KiB)
hidapi-0.14.0.post4-cp39-cp39-win32.whl (62.1KiB)
hidapi-0.14.0.post4-cp39-cp39-win_amd64.whl (69.2KiB)
hidapi-0.14.0.post4.tar.gz (170.3KiB)
Extras: None
Dependencies:
setuptools (>=19.0)