Skip to main content

libusb

Python binding for the libusb C library.

Overview

Python libusb module is a low-level binding for libusb C library.
It is an effort to allow python programs full access to the API implemented and provided by the well known libusb library.

PyPI record.

Documentation.

libusb is a lightweight Python package, based on the ctypes library.
It is fully compliant implementation of the original C libusb 1.0 API by implementing whole its functionality in a clean Python instead of C.

libusb API 1.0 documentation can be found at:

libusb-1.0 API Reference on Documentation.

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 image 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, macOS, Windows, 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, macOS, Windows (Vista or newer), Android, OpenBSD/NetBSD, Haiku, Solaris.

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 fully tested only for Windows.

Installation

Prerequisites:

To install run:

python -m pip install --upgrade libusb

Development

Prerequisites:

  • Development is strictly based on nox. To install it run:

    python -m pip install --upgrade nox

Visit Development page.

Installation from sources:

clone the sources:

git clone https://github.com/karpierz/libusb libusb

and run:

python -m pip install ./libusb

or on development mode:

python -m pip install --editable ./libusb

License

Copyright (c) 2016-2026 Adam Karpierz
Licensed under the zlib/libpng License
Please refer to the accompanying LICENSE file.

Authors

Sponsoring

If you would like to sponsor the development of this project, your contribution is greatly appreciated.
As I am now retired, any support helps me dedicate more time to maintaining and improving this work.

Donate

Metadata

Release files for libusb 1.0.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libusb 1.0.30
File Size Uploaded
libusb-1.0.30.tar.gz 918.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libusb 1.0.30
File Interpreter ABI Platform
libusb-1.0.30-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / libusb-1.0.30.tar.gz

Download URL libusb-1.0.30.tar.gz
Size 918.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a54765688ad6acc83c9365f889dad25998f76c7dbdb380cf9cc6b8eb9a543d4b
BLAKE2b-256 checksum
How to use checksums
6fc92b8ab8a0239086a031aceacf8920d5508437e198175b5d39d57d126b3644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / libusb-1.0.30-py3-none-any.whl

Download URL libusb-1.0.30-py3-none-any.whl
Size 853.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6666d606a4c1dc75bf932f8c066aeec2fa1f29c1e13add589e4543647d909e2f
BLAKE2b-256 checksum
How to use checksums
c8ccc1b6b5152804a40caf249d25be5a5c4e2bc09d29145c9e526e137cd61ea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

1.0.30 This release

2 release files

1.0.29

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page