usbipd-python
A USB/IP server written in Python 3 for sharing USB devices over the network. This implementation uses the pyusb library and the libusb backend to support cross-platform USB device access on macOS and Linux.
Note: This is an early-stage implementation, primarily created for learning purposes. Simple USB devices generally work well, but more complex or HID-based devices may experience issues. HID devices are managed by OS kernel drivers on macOS and Windows, making them difficult to detach without OS-native code or custom drivers. Contributions are welcome!
Installation
Users
Install from PyPI:
pip install usbipd-python
usbipd --help
Developers
-
Clone the repository:
git clone https://github.com/abrinkman/usbipd-python.git cd usbipd-python
-
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate
-
Install in development mode with dev dependencies:
pip install -e ".[dev]"
System Requirements
- Python: 3.9 or higher
- libusb: Install using your system package manager
- macOS:
brew install libusb - Linux (Debian/Ubuntu):
sudo apt-get install libusb-1.0-0-dev - Linux (Fedora/RHEL):
sudo dnf install libusbx-devel
- macOS:
Usage
List USB Devices
Display all available USB devices:
usbipd list
Bind a Device
Bind a USB device by its bus ID to make it available for sharing:
usbipd bind --bus-id <bus-id>
Note that although you need to bind using the bus-id, in reality bindings are stored persistently using the device's VID:PID:serial. This means that even if the bus ID changes, devices are still recognized. Devices without a serial number are matched by VID:PID only.
Start the Server
For MacOS and perhaps other operating systems you will need to start the server with elevated privileges, as the underlying libusb library requires exclusive access to USB devices:
sudo usbipd start
Add -v or --verbose for debug output:
sudo usbipd -v start
If your user lacks permissions the application will warn you for this when attaching a device. Please note that these kind of issues can lead to undefined behavior, blue screens or kernel panics on either side. You have been warned!
Connect to the Server
Use a USB/IP client on another machine to connect and access shared devices.
Development
Code Quality
Run linting and formatting checks using ruff:
ruff check . # Check for linting issues
ruff format --check . # Check code formatting
ruff format . # Auto-format code
Run type checking:
mypy --ignore-missing-imports .
Project Structure
usbipd.py- Main CLI entry pointusb_device.py-USBDevicewrapper class forpyusbdevice accessusbip_server.py-USBIPServerclass implementing the USB/IP protocolbinding_configuration.py-BindingConfigurationclass for XML-based device binding storagelibusb_backend.py- Cross-platform libusb backend loader forpyusb
License
Licensed under GPL-3.0. See LICENSE for details.
Metadata
Release files for usbipd 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| usbipd-0.0.7.tar.gz | 47.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| usbipd-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.4 kB
Release files / usbipd-0.0.7.tar.gz
| Download URL | usbipd-0.0.7.tar.gz |
|---|---|
| Size | 47.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de762178e21e7e8e1a85807223b4d35d659b267ade8bcaad0e74e99bb17a19ff
|
|
BLAKE2b-256 checksum How to use checksums |
148186258ca7e6978335b5122e89d7b4d26e4829c9997960cd270ca78b5fb9f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 9, 2025.
Transparency logRelease files / usbipd-0.0.7-py3-none-any.whl
| Download URL | usbipd-0.0.7-py3-none-any.whl |
|---|---|
| Size | 30.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c034aa9cefe1a03b4bccae0e0f2523e3c2bc4f6504788afc6712a0250d245eea
|
|
BLAKE2b-256 checksum How to use checksums |
2a54ed9030509627c1b18cab2911ba77710daf8017069cdf7a7476937cd830b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 9, 2025.
Transparency log