Skip to main content

Python bindings for HIDAPI

Project description

hidapi-py

hidapi-py provides Python bindings for the HIDAPI library, enabling interaction with HID-class USB devices.

Usage

You can use the hidapi_py module in your Python scripts (listing all connected DualSense controllers):

from hidapi_py import get_all_device_infos

print(hidapi_py.__version__)
print(hidapi_py.__hid_version__)

SONY_VENDOR_ID: int = 0x054C
DS_PRODUCT_ID: int = 0x0CE6

devices = get_all_device_infos(SONY_VENDOR_ID, DS_PRODUCT_ID)

print(devices)

Features

  • Access HID device information such as vendor ID, product ID, and serial number.
  • Communicate with HID devices using Python.

Building from Source

Windows

Ensure you have the following installed:

Use the following commands to build the project on Windows:

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --clean-first --target hidapi-py

Mac OSx

Install the HIDAPI library using Homebrew:

brew install hidapi

To build the project on macOS for x86_64 architecture, run:

./scripts/build_macosx_x86_64.sh

Ubuntu

Install the HIDAPI library using your package manager. For example, on Ubuntu:

sudo apt-get install libhidapi-dev

Run the following commands to build the project on Linux:

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --clean-first --target hidapi-py

Contributing

Contributions are welcome! Please submit a pull request or open an issue for any bugs or feature requests.

License

This project is licensed under the terms of the LICENSE.txt file.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

hidapi_py-0.1.2-pp311-pypy311_pp73-win_amd64.whl (174.8 kB view details)

Uploaded PyPyWindows x86-64

hidapi_py-0.1.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl (202.4 kB view details)

Uploaded PyPymanylinux: glibc 2.34+ x86-64

hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_14_0_arm64.whl (86.5 kB view details)

Uploaded PyPymacOS 14.0+ ARM64

hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_13_0_x86_64.whl (94.6 kB view details)

Uploaded PyPymacOS 13.0+ x86-64

hidapi_py-0.1.2-cp313-cp313-win_amd64.whl (175.3 kB view details)

Uploaded CPython 3.13Windows x86-64

hidapi_py-0.1.2-cp313-cp313-win32.whl (153.1 kB view details)

Uploaded CPython 3.13Windows x86

hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_i686.whl (1.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

hidapi_py-0.1.2-cp313-cp313-manylinux_2_34_x86_64.whl (202.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

hidapi_py-0.1.2-cp313-cp313-macosx_14_0_arm64.whl (86.2 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

hidapi_py-0.1.2-cp313-cp313-macosx_13_0_x86_64.whl (95.0 kB view details)

Uploaded CPython 3.13macOS 13.0+ x86-64

hidapi_py-0.1.2-cp312-cp312-win_amd64.whl (175.3 kB view details)

Uploaded CPython 3.12Windows x86-64

hidapi_py-0.1.2-cp312-cp312-win32.whl (153.1 kB view details)

Uploaded CPython 3.12Windows x86

hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_i686.whl (1.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

hidapi_py-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl (202.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

hidapi_py-0.1.2-cp312-cp312-macosx_14_0_arm64.whl (86.1 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

hidapi_py-0.1.2-cp312-cp312-macosx_13_0_x86_64.whl (94.9 kB view details)

Uploaded CPython 3.12macOS 13.0+ x86-64

hidapi_py-0.1.2-cp311-cp311-win_amd64.whl (175.0 kB view details)

Uploaded CPython 3.11Windows x86-64

hidapi_py-0.1.2-cp311-cp311-win32.whl (152.7 kB view details)

Uploaded CPython 3.11Windows x86

hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_i686.whl (1.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

hidapi_py-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl (202.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

hidapi_py-0.1.2-cp311-cp311-macosx_14_0_arm64.whl (86.5 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

hidapi_py-0.1.2-cp311-cp311-macosx_13_0_x86_64.whl (94.8 kB view details)

Uploaded CPython 3.11macOS 13.0+ x86-64

File details

Details for the file hidapi_py-0.1.2-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 eb05f7039ae3e1e59e9ce08112b63d87ad753462f59be90ccce9f7ab4cd20af4
MD5 b5241bef4d2ee6bd9f6171949f2ddad0
BLAKE2b-256 7bec61c9ce5bb7a61fd6db94a44f4058129bbd51392c5c746554aebe7febaeea

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b8481ac4b9063740fe23be0cdfd1910a057ae28323ce1046eb3e1e329b341cec
MD5 0eb1c1cefd4987182968359598517883
BLAKE2b-256 def3ee62a08db5533430c131927d618672536a18d2225f02c9ca4e41d394ccae

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 09f54a005048f6579975b8fa97eb0b9719676e288f406bf9c50646521d39bf87
MD5 7f1242bd3816c3408ce85463f4addb95
BLAKE2b-256 ef429333443c4a3b0d60cd6eabb5e5875225a9400b05bf00e896c2c1823a6d53

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-pp311-pypy311_pp73-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f6416ca388afed5b0250a22716e290349169f703077093497f4b814842440844
MD5 f07b8eba27da724f83cf7f92c6540798
BLAKE2b-256 cbfa7d3f4405a679175d735ecdf213b46096cb5d593552ad27d9a6c4416cfd25

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 175.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a571ad168e8d02281a6d35cc35e68d1b4833f7be6761a1040d3cc7a4f742f138
MD5 3591adc6928fd066c5e970fb0433515f
BLAKE2b-256 c468ea541545bb0ec92942e0632b6faf3f151060fbb734f55555fb35e8eca8e6

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-win32.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp313-cp313-win32.whl
  • Upload date:
  • Size: 153.1 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 46aefdf3fa133557aac9b27c313f6784b3877ddbbf67a230f74faa2ed1e8134e
MD5 1d5c77316e5d10a93bafe993216e1894
BLAKE2b-256 5c6551f618bebd48dec41ab915a3ef9c4acc872bdc23e7d506cb8c71845c0e66

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fe04b0a6333eb06967db270b904f683149337fb036a2c2366b384b00a10ab4bd
MD5 dfc5a2af3d2bd6b2eac20b42dc5bc702
BLAKE2b-256 a1ca5a7f0cf78c6f4385f0ca977b2bbb39e35c893ca8dd8c925403bd996c519d

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 91e6ea8e059721237197c0257843ebd5150fd15a0c7fcbb7ec345350109095ff
MD5 0855190ff2f799e36a03c09917eecf6c
BLAKE2b-256 80bae2747acdaabb85798ec6935a0709f2329c60f9d7dedf8995b5cdd715f320

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cd6806f2fd0d603ce08fda4ee66924aa03942f9a784fed6426ad7b6add7465bc
MD5 f741893b56f8b119fe4b7229f95116b5
BLAKE2b-256 9c56d9943ca78e7411c08508b88df55541839f745469c33e03bf6410dd81147b

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 78edcb5eb2f73ac3804654e186926b8d8572715e7a6351df0b5043958982b902
MD5 b7431e1e8a5ec78d87f379a48b6acf27
BLAKE2b-256 1f1fe878add5d0783a6b2eb7b86cde2979b781bfe5557770702d7e15f90b40d7

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 4ed0df76f2720d466cc074b268a15bdbe15850dbf6d4f179b2ad4531413693b3
MD5 48607ca4a0422e195dada58f7c22de85
BLAKE2b-256 ff91de5e45fad1aa6e4810e38ee60683dcaea8c799da1e945993b71cc5a61770

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 175.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 af0f2571f0722b49fcdf7c4033abe850af50ec28b0bb5a0ba12771ad216e438a
MD5 98a2a120037fbd0f5b95159ecde3b6e2
BLAKE2b-256 0a7afcaa9920df70ffe8ab7bd7ad3b43d0cbc740885aa6fa808f0df26718954f

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-win32.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp312-cp312-win32.whl
  • Upload date:
  • Size: 153.1 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 034c1febc5a8de3f56302a5ae9eb9b7922c07d10a00e3495e4a9a299416b9b9b
MD5 fdc98b3025df9e63915c78cfe2db1c01
BLAKE2b-256 ccf17ef82b48208ad318fa68615702f6d0d651cfc873c1ae048e4b0194b40343

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d1dc0c705c8a71714f7d5d8241060c9993c38b716fea6d3dcdcb674cdb706462
MD5 8258a88e903562e2c9c225601b4caec9
BLAKE2b-256 6d6baf3959e8c22da38db99980a10bcef15e502f14ded403996715e5012ce32d

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 10f4f3fcb18a7d6540f4da7a2c9712cc79751668425c50025846272573fed45c
MD5 d5dcf91415b4794f7062c1898fceb250
BLAKE2b-256 3b0b62004491b157a02b1ed23eda843bdd0376b6994c18ce15e5ecbeee7822db

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ae5139e8589a65aa8a1497e025b85f0879523de8355821d3bd36373c71b5f4db
MD5 740422cfa076bef729d4ca71736d3164
BLAKE2b-256 e29aa3d81005b907e98a9b82ffc42313fb11263216b37fef94b2f45a3e766682

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6c64384e9260aca900d721442248cfc73e17921aa35748c6108656ce273ca4c8
MD5 792beba538dc1c81b8df5b3293becf40
BLAKE2b-256 3ac305c44d3fd72d7aee173b1dc1c978cd315905a89507cd8973fe910dea133f

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 008318dc54846de256c215c65fb6d1cd7b5e6ed1dd7a196f972a3d37292f0ed7
MD5 05ed8ad1123b96b4d69edd0b0a437b14
BLAKE2b-256 fdf1cbb2e5a7fc479221f8a5d290d4dcaed0aa52cc20088fab14acf9c069677a

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 175.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 296f2c190fb74e12ebf3846af0a3452deed5462666da0ff399acae27d3395e72
MD5 34a058745f1f5eaab36d602cf4031319
BLAKE2b-256 b31da6ed4c56dc11428417c2e69496826da7dfb42307f574f8bc7739607c0f6a

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-win32.whl.

File metadata

  • Download URL: hidapi_py-0.1.2-cp311-cp311-win32.whl
  • Upload date:
  • Size: 152.7 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.12

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 45be29653714bec045830eb7b983a1b0572e69c71f9c61a025ee13a95969f904
MD5 ef3f9893a6b7c4df9d12a6f38ee513fc
BLAKE2b-256 e533c7895b39033596f0170b1730d074596602fbb02b6b4b7944012edffa71f5

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dc67a7396e0da0c253e0e13d11bc5dbcbf6168c89a3ac1f05045bfc87b327dcb
MD5 ee17676f1257ce12ba311bc0491fa761
BLAKE2b-256 96d60b2dd6f7f1442e463e422b05b468ee97abc9790de6c0a25e5bb6f61e89e0

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 3223af9f02d31c8aadf214c064b8dfdd6d94fdd7f1782b02ea3dbe44d5d57ac0
MD5 9b7492d6b1deb12915d20c5b6735ac47
BLAKE2b-256 dcd5f06f5674fe92c7ffb7fe83cf2a9156e06792939eac59be6364062b0756d7

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1240379e35246f90531d4796364f3909db48f549e2aeed113b2f8ac733e67c1a
MD5 facca594b0fabeb6da7508b0b6d5c42f
BLAKE2b-256 12945785c38ddd22d4a0d768a832ac8197febed21615ed0792a8f7eba7e0fbba

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 74b72088798d61508dbe81d40ff0469c586d2389078cdd908af6b3aceca8074a
MD5 8026479aa028bb51b0d650d536d96a3a
BLAKE2b-256 777d33a8d03ae8ec9da6f5db501fc69f237380b4a040508df63a6c39f5aa7d56

See more details on using hashes here.

File details

Details for the file hidapi_py-0.1.2-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for hidapi_py-0.1.2-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 2bb7c91e56586d69edf6c9982265442751cf0bdb2262f87bcf415a0dfd95db13
MD5 e0948105dc1ee2657cca97bfd901b0ee
BLAKE2b-256 49218caf859c09b8adcdbc01fe073b96242935ad8bf51960345e7e2b35226401

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