Python binding for the libusb C library.
libusb-1.0 API Reference
libusb uses the underlying libusb C shared library as specified in libusb.cfg (included libusb-X.X.* is the default), but there is also ability to specify it programmatically by one of the following ways:
import libusb
libusb.config(LIBUSB="libusb C shared library absolute path")
# or
libusb.config(LIBUSB=None) # included libusb-X.X.* will be used
Borrowed from the original website:
libusb - A cross-platform user library to access USB devices
Overview
libusb is a C library that provides generic access to USB devices. It is intended to be used by developers to facilitate the production of applications that communicate with USB hardware.
It is portable: Using a single cross-platform API, it provides access to USB devices on Linux, OS X, Windows, Android, OpenBSD, etc.
It is user-mode: No special privilege or elevation is required for the application to communicate with a device.
It is version-agnostic: All versions of the USB protocol, from 1.0 to 3.1 (latest), are supported.
What platforms are supported?
Linux, OS X, Windows, Windows CE, Android, OpenBSD/NetBSD, Haiku.
For additional information, please consult the FAQ or the Wiki.
- It is a fully independent package.All necessary things are installed during the normal installation process.
ATTENTION: currently works and tested only for Windows.
Prerequisites:
- Python 3.9 or higher
- https://www.python.org/
- with C libusb 1.0.27 is a primary test environment.
- pip and setuptools
To install run:
python -m pip install --upgrade libusb
Prerequisites:
Development is strictly based on tox. To install it run:
python -m pip install --upgrade tox
Visit Development page.
Installation from sources:
clone the sources:
git clone https://github.com/karpierz/libusb.git libusb
and run:
python -m pip install ./libusb
or on development mode:
python -m pip install --editable ./libusb
Copyright (c) 2016-2024 Adam KarpierzLicensed under the zlib/libpng LicensePlease refer to the accompanying LICENSE file.
- Adam Karpierz <[email protected]>