A Cython interface to the hidapi from https://github.com/libusb/hidapi
Project description
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
Download cython-hidapi archive:
$ git clone https://github.com/trezor/cython-hidapi.git $ cd cython-hidapi
Initialize hidapi submodule:
$ git submodule update --init
Build cython-hidapi extension module:
$ python setup.py build
To use hidraw API instead of libusb add –without-libusb option:
$ python setup.py build --without-libusb
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 .
Test install:
$ python >>> import hid >>>
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/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for hidapi-0.11.0.post2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449f6a9f0230ec0af749a4f6057afd81285112d702e2b8b19059a061ec8df591 |
|
MD5 | b92f9a1eb694607bc792bdd11c17d6f0 |
|
BLAKE2b-256 | 52d06da64b979b3b0f658e3b3d58d5f8b110e76458a019bdaed330e45d9a4d59 |
Hashes for hidapi-0.11.0.post2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19ca6866dee8ac7668f3b4f12103c0df55ff65cda5c9c400aefc21fb29512004 |
|
MD5 | 903db87037074441ddf4109b823088ea |
|
BLAKE2b-256 | 643912b0134051d47b15d2dc270312b37b6623690edb22345dea3e1554398077 |
Hashes for hidapi-0.11.0.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a70135e8091c8ae685374fcb148ee81b15423072e2ee32f40f7ad710879d4a |
|
MD5 | 4e9edb5337960d53896c93981045795a |
|
BLAKE2b-256 | da4038ad67e528322d992444dfe22eb55ef0d9f2293f5f354429a8e30d0caebf |
Hashes for hidapi-0.11.0.post2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91ee15c358787583b8f403f9b7b40d48fa4d3e74544e6313f90de83a7695a96 |
|
MD5 | 6f58b4732d6454092cdc23526822c5cb |
|
BLAKE2b-256 | e67051cbf22ad5cbf757c84d299ee2e85756bb4c7401ea75011ef872f56f68c8 |
Hashes for hidapi-0.11.0.post2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b54a90af7d4d73e730153099f37869feb27784649d1bf29a52ce9faf3168fb |
|
MD5 | 1eeebdea8c8832ecedd01a9f72fd16ed |
|
BLAKE2b-256 | 4b890b6c00e1e4cf85e7d1b86c011572a50088da932b0fd14ca98cb4b41d5a88 |
Hashes for hidapi-0.11.0.post2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fc745eaec01dcc25d71b02cd868e1e34e0c53c4ac7f0f0edbb3a56dbd5e50f8 |
|
MD5 | 8fddd37edd4abf358029ca489ddb729f |
|
BLAKE2b-256 | 603b30d4440a2d6be58f04fca3faea108ffbdb452b1628465614dc1fa1674349 |
Hashes for hidapi-0.11.0.post2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a64b6509064b683ef8ca9888f71906e3dbc6909ab2e3361cbaf6d25a007ab5f |
|
MD5 | 916040325541059bac0dac2d995b8e84 |
|
BLAKE2b-256 | e583f53f4428253281493c4df3cc8956c6ef5f86c6bfb541b0bfe007c5dfe3bb |
Hashes for hidapi-0.11.0.post2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c51889894d389e0de63a2adb7faafd9c8c24928b50848365cd4b4d0d57e10b |
|
MD5 | 2339a7fe7d23022fe7d3a8261edc2529 |
|
BLAKE2b-256 | 80d900feba095e79e10cde0ba02b099e60a0e680859872a108554262032b1f8d |
Hashes for hidapi-0.11.0.post2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8d5ce93c4ea2a51a10cd8405409252107350b0402e3372d905846c0e7326ae |
|
MD5 | 6eb9fa0696cc36c0acca23405c9670f5 |
|
BLAKE2b-256 | 928b6330f1e33be87dcb34007afad41bb82c1c5809648ea96826bd4a41d57997 |
Hashes for hidapi-0.11.0.post2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 991b9c9f5a4400d3493cfba2511b0a7f6199eff3ef0968ca65bace32d0f811bf |
|
MD5 | 1bb2f411ad2cb2ef5cfadf613be2e15c |
|
BLAKE2b-256 | d721ba6742019f270d1897f389d3b9002d47abbf5f4acc0e92440ec074d7fef1 |
Hashes for hidapi-0.11.0.post2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c70ec32cdfd0c1303fe4aa22ddf839282bdce279a0c038c6efdddc703342dd6 |
|
MD5 | 2627c43682d1b5cfda4a4e6f78215056 |
|
BLAKE2b-256 | cd9ed4eb46f70904805a5f52a2602afcb71480e1b13989cff2e0ff2c70e7af69 |
Hashes for hidapi-0.11.0.post2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55d1a6cdbefb5de85bb54e6d4d4967554fed7d26b874d3290cb1a9f02dfa5865 |
|
MD5 | 47fd9d5841ed546f062cdc9c085c2b68 |
|
BLAKE2b-256 | 7cf40f55a19732a1d8033f404833ac41db04505c7d0349f858bfd8bec690a7d4 |
Hashes for hidapi-0.11.0.post2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08f5eb2e3e5451c3c631b6b018b3187b6a2fca9c3c200cb5a17fb69fd7f479bb |
|
MD5 | 26da0515ec0b3975fb4e682b762ad1f6 |
|
BLAKE2b-256 | 6fd4c2370189599a25ae14dc6d588fb01a76486c96b8e11bb23a65b46742787f |
Hashes for hidapi-0.11.0.post2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08da7855400a516a742c4dfd6a3b6d69ee56d281561f7fb284c7a289bb2d5b40 |
|
MD5 | e21d261fe913b42ac7459e6751b2cc31 |
|
BLAKE2b-256 | 06874e64c63b66a237f80d819601845ea6b7ba4a0f553cb460f2cf07728e2943 |
Hashes for hidapi-0.11.0.post2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84040de52295f043094ca2b6257c6c1fe390fd8d2623ae000a46122150b15b7 |
|
MD5 | aab2f3511d5e8863ab48f2a5d478ee31 |
|
BLAKE2b-256 | 005af3affd986099366968079a045e7684afb7747a04cfe5e7f6e96a5b2b3ec7 |
Hashes for hidapi-0.11.0.post2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d15e7238bbeab71313b4366e65032e5db6c314a3323729e1d4a4798f6f6c111b |
|
MD5 | fbf1f21078e50b7a68082df3367a7fec |
|
BLAKE2b-256 | 7f8e108d7b36d50b46b7d1735dbb84db457f6ad3ea3d95cd95e57b4a26f5f18b |
Hashes for hidapi-0.11.0.post2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7d28a6473626f7ddb83a32349196880e8ff38a809f4eeb221f212264c8c9431 |
|
MD5 | b40fe4d8340190666035b1db2f239272 |
|
BLAKE2b-256 | efc45d92d1563226a7ad02aaf9e93e8853da95feef00697f5b18b07d20699fde |
Hashes for hidapi-0.11.0.post2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bc4ed3c34e4b0b6be589ef88845d7697bd81acf9079ded9d53ab1ebe874dc01 |
|
MD5 | 0e262ac6e0afe05f103417d3a972b01c |
|
BLAKE2b-256 | 4065025ae8bfa510ac08b4e98442501c69f1f65c287cbd33630ca8f2e135e311 |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e82b4aaa9c000c49b6fb1296974713b21d3e8fa3e0c87efab03998e4d6dbeee |
|
MD5 | 1b29137d2a73f992dbe63be364fe814f |
|
BLAKE2b-256 | d3fc54fcd42b980bf7ecf42d05ddffa80ecd9763fc9aa766afa410e034ac2ff9 |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87cbeee15afe23759a3c8eb07eb0ecf156f5f4db98aa31ff2ceee4b45feac4f9 |
|
MD5 | 61d083cf4ad9cb4276497982c7163b7e |
|
BLAKE2b-256 | 398b687fcfb2e4e08b8840bb15d0f42853eb7cedac8ecb5603b4f0329e6aa82a |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053f1f06a671b1e466339a04ee46d91b86932212aaf3b9160d358a6fae80ef50 |
|
MD5 | b144e94fadb0caadbabd47099605e243 |
|
BLAKE2b-256 | 35d7c982f6eea6903adfe50369310f03f67a24a910f9e46b6f27ac17722a471c |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a19864e2528fff9c708126f72176790c0bb7cb1e31a904ccadc6b6f9fd29a7a1 |
|
MD5 | 3504a7642899677bf247722dabeb69e1 |
|
BLAKE2b-256 | c5cc7b58bb6f62e206591acc796b9ef7fa85bb2fdbeda9bb2d26dd9e4289cd1a |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 782d0c208d794c540e999b1737ddb9ebc36df604d7739889b9659fcc3819f4ce |
|
MD5 | 8b00866b79220ec1730c9623c85bfb53 |
|
BLAKE2b-256 | 1eddde942f1dcc12d60bc793687fded5c3527bb8bfb82e32d6835490e61d00d7 |
Hashes for hidapi-0.11.0.post2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f8e67042d5dbf6ecec0f8cbf347d99ad074dcb600754bc60609f3340c746977 |
|
MD5 | f6df1ff3c4f65a781435d6ec5e26684d |
|
BLAKE2b-256 | 7f2ec7e1dfd4733ca833210ab1752fa277585e04c4aead57eaf2e9a34d246915 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3083655c9306ff87c3f790949cdbac933fc8c6912dd7063c0c3e6e199b9e40b8 |
|
MD5 | b8f4bb1017ffe599a307f8629ade19d6 |
|
BLAKE2b-256 | 19c02cf8fab500e21de013837447910e144b871b4d564ddcea097e38713fc3e5 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67953056555f48539f268f9326462f4a1d525191712fd6af3666e7787f4a609b |
|
MD5 | a8a12cef6f17e69ebdce2433339c1681 |
|
BLAKE2b-256 | 5b4ee9c6d316875413f03a9aecde3aaa81aa7aee6d0cb213a2bbd0f8e4f24716 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afabcf8fdbdc355b907c03984258d7f9acc01eac5114837364fe227c239d53d7 |
|
MD5 | ecac852d32050c2ad7efb01a6777c06b |
|
BLAKE2b-256 | a6d75e4c2ce253188f09ed6fca6d4d63a87e5e1c2c25c99581afbe7b092521b8 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017f379e03f00a35ba12df9819df9bd219a14dd8444860d093a6f9878a505867 |
|
MD5 | c665a0cd3c37d30ebc5abcd8966f5c19 |
|
BLAKE2b-256 | d9691b362bf2d36a389e28f922853182fd4980c1a962faff82302504c783c442 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8bd1395e25ae557f129973b2153fdb8a0d6debd0f7411ba72abe7dbe536ebe3 |
|
MD5 | d1f02a5eff6d053da08479bd9ada2cf8 |
|
BLAKE2b-256 | 5d9db370a2caba0fb97858df18daa7df5356b5f535ef56aae9e18d4925b81940 |
Hashes for hidapi-0.11.0.post2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30a90663a399f71cd3df75d42422643eb3fc290ca19553eaee88ca352e626ff |
|
MD5 | 4fc29f995c77906af2680fe8c8a16d3f |
|
BLAKE2b-256 | c71d716fcf2bcc4a0c27e4470fbb6fc5ea4f4b4ab650e997fc83782e5f43d2cd |