Python binding for the libusb C library.
Project description
libusb
Python binding for the libusb C library.
Overview
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
About original libusb:
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.
Requirements
- It is a fully independent package.All necessary things are installed during the normal installation process.
ATTENTION: currently works and tested only for Windows.
Installation
Prerequisites:
Python 3.6 or higher
3.7 with C libusb 1.0.22 is a primary test environment.
pip and setuptools
To install run:
python -m pip install --upgrade libusb
Development
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
License
Copyright (c) 2016-2021 Adam KarpierzLicensed under the zlib/libpng LicensePlease refer to the accompanying LICENSE file.
Changelog
1.0.24b1 (2021-11-10)
Upgrade for Windows: libusb v.1.0.23 -> v.1.0.24
Add support for macOS (thank you very much dccote@Github!).
Copyright year update.
backward incompatibility - libusb.cfg is now a regular INI file.
Fixes for examples (but still some examples don’t work properly).
Setup update.
1.0.23b7 (2020-11-19)
Ability to specify the underlying shared library programmatically.
General update and cleanup.
Setup update.
Removing dependence on atpublic.
Fixed docs setup.
Fix for hotplugtest example.
1.0.23b1 (2020-09-15)
- Upgrade for Windows: libusb v.1.0.22 -> v.1.0.23(partially; without libusb_wrap_sys_device, becauseoriginal Windows v.1.0.23 dlls do not export this function).
Add support for Python 3.9.
Drop support for Python 3.5.
Setup update.
Cleanup.
1.0.22b9 (2020-01-17)
Added ReadTheDocs config file.
Setup update.
1.0.22b8 (2019-11-24)
Upgrade for Linux: libusb x64 v.1.0.21 -> v.1.0.22
Fix for error when the shared library is configured.
Cleanup.
1.0.22b6 (2019-11-23)
Initial support for Linux (libusb v.1.0.21 x64).
1.0.22b5 (2019-11-14)
Drop support for Python 2.
Drop support for Python 3.4.
Add support for Python 3.8.
Setup update and cleanup.
1.0.22b4 (2019-02-15)
Setup improvement.
Update required setuptools version.
Some updates of examples.
1.0.22b2 (2018-11-08)
Setup improvement.
Update required setuptools version.
1.0.22b1 (2018-03-30)
Upgrade to the libusb v.1.0.22
Setup improvement.
1.0.21b4 (2018-02-26)
Improve and simplify setup and packaging.
1.0.21b3 (2018-02-25)
Setup improvement.
1.0.21b2 (2017-12-18)
Fix the error of platform detecting.
1.0.21b1 (2017-10-11)
First beta release.
1.0.21a3 (2017-08-20)
Next alpha release.
1.0.21a0 (2016-09-24)
First alpha release.
0.0.1 (2016-09-23)
Initial release.
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 Distribution
File details
Details for the file libusb-1.0.24b1.zip
.
File metadata
- Download URL: libusb-1.0.24b1.zip
- Upload date:
- Size: 320.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba7b008bf54458c269977f673c2e7e662591ff17901a3088fcb3b39e0c7b4a5 |
|
MD5 | 7ffc852bcffe7312d9a5e788073d6b1d |
|
BLAKE2b-256 | b803159e7bca9c7f37f6219ef4468d178655bb0b6c0506bf3537b8e3cf3d4ddf |
File details
Details for the file libusb-1.0.24b1-py3-none-any.whl
.
File metadata
- Download URL: libusb-1.0.24b1-py3-none-any.whl
- Upload date:
- Size: 259.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52095c4793682c581bbf8a940e30c2abbe2b9a1f54571afe7f34b8602b31236e |
|
MD5 | 5bf93acfd47247e03e84b085f9964d49 |
|
BLAKE2b-256 | a4e46defd155b097e417cff28fbb3fa311951289b7dbba13f9b7dc1a4b8d8edd |