usbx is a modern, powerful and user-friendly Python library for working with USB devices. It provides many useful features:
- Querying information about connected devices
- Communication with USB devices
- Notification when devices are connected and disconnected
- Single API for Windows, Linux and macOS
- Good documentation
- Thread-safe
- No need to install further software like libusb
usbx is easy to use:
>>> from usbx import usb
>>> for device in usb.get_devices():
... print(device)
...
USD device 4295171929, vid=0x1a40, pid=0x0801, manufacturer=None, product=USB 2.0 Hub, serial=None
USD device 4295171974, vid=0x0b0e, pid=0x0412, manufacturer=None, product=Jabra SPEAK 410 USB, serial=783F92B9DD3Cx011200
Installing
usbx can be installed with pip:
python -m pip install usbx
Usage
The User Guide will get you started with the library. Also read Platform-specific Considerations as some operating systems might need extra steps to work with USB devices.
The API Reference documentation provides API-level documentation.
Examples
Serveral examples demonstrate the use of the library:
- enumerate.py: Enumerate all connected devices including details about the interfaces and endpoints
- monitor.py: Monitor USB devices being connected and disconnected
- epaper.py: Display an image on e-paper display with (with IT8951 controller)
- stm32dfu: Upload firmware to an STM32 based device
License
usbx is made available under the MIT License. For more details, see The MIT License.
Contributing
This is an open-source project that happily accepts contributions. Please see Contributing for details.
System Requirements
- Python 3.9 or higher
- Windows (x86-64 or ARM), Linux (x86-64 or ARM), macOS (x86-64 or ARM)
- 64-bit platform and Python interpreter
- For Linux: udev (usually goes together with systemd)
Metadata
Release files for usbx 0.8.3
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 |
|---|---|---|---|---|
| usbx-0.8.3.tar.gz | 48.2 kB | Without provenance | Details for usbx-0.8.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| usbx-0.8.3-py3-none-any.whl | Python 3 | none | any | Details for usbx-0.8.3-py3-none-any.whl |
Total release size: 105.6 kB
Release files / usbx-0.8.3.tar.gz
| Download URL | usbx-0.8.3.tar.gz |
|---|---|
| Size | 48.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee0147d4f280237b41a52f2f4cd134be2303e388f1d7b9337686d64c81188d66
|
|
BLAKE2b-256 checksum How to use checksums |
451919135c021c258560dac7a64b483bfd25d652425669c00f1a7697b4d05956
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Release files / usbx-0.8.3-py3-none-any.whl
| Download URL | usbx-0.8.3-py3-none-any.whl |
|---|---|
| Size | 57.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd9d609320e22f86a21a224cf7a8fd1fb50d5b4668400cae6361261d736edd60
|
|
BLAKE2b-256 checksum How to use checksums |
7a661c332c38e21c3750263abd3b7a17ac462466909f2b3cbfcdd3dfc0d45f60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Security for usbx 0.8.3
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.