Skip to main content

pyusbip

A pure-Python USB/IP server backed by libusb. Shares USB devices from macOS (or any libusb host) into a Linux USB/IP client — e.g. Docker Desktop's VM, a remote Linux box, or a CI runner.

Forked from tumayt/pyusbip.

Install

uv tool install git+https://github.com/jenish-rudani/pyusbip

Run

sudo pyusbip                 # USB/IP on :3240, HTTP control on :3241
sudo pyusbip --vid 0x0483    # only export ST devices
sudo pyusbip --help

sudo is required for libusb to claim devices on macOS.

HTTP control plane

JSON over HTTP on 127.0.0.1:3241. CORS allow-all.

  • GET /health — uptime, device counts, API version.
  • GET /devices — list of libusb-visible devices with bus_id, VID/PID, strings, and bind_state ("shared" or "attached").

Library use

import asyncio, usb1
from pyusbip import USBIPServer, ControlPlane

async def main():
    ctx = usb1.USBContext(); ctx.open()
    loop = asyncio.get_event_loop()
    server = USBIPServer(loop, ctx, vid_filter={0x0483})
    control = ControlPlane(loop, ctx, server)
    await server.start(); await control.start()
    await asyncio.Event().wait()

asyncio.run(main())

Development

uv tool install ruff pre-commit
pre-commit install
ruff format . && ruff check . --fix

Version lives in pyusbip/__init__.py; pyproject.toml reads it dynamically. Bump, tag, push.

Requirements

  • Python 3.8+
  • libusb1
  • Root to claim devices

License

MIT — see LICENSE.

Metadata

Release files for pyusbip 2.0.1

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

Source distribution (sdist)

Source distribution for pyusbip 2.0.1
File Size Uploaded
pyusbip-2.0.1.tar.gz 29.3 kB Details

Built distribution (wheel)

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

Total release size: 59.6 kB

Release files / pyusbip-2.0.1.tar.gz

Download URL pyusbip-2.0.1.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ed82ba7e6e11b0c3bea349b11b2f90087cd5e642368c5d6687e3daaa474e29c1
BLAKE2b-256 checksum
How to use checksums
06eb702efce8db66a85145e6a3febf312faffb02b4838a639f16932fbdd80f92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 22, 2026.

Transparency log

Release files / pyusbip-2.0.1-py3-none-any.whl

Download URL pyusbip-2.0.1-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62a5c65fc69e29a90fefd8466858e026b802cf8bbfb1b849a2290654f07dcb0d
BLAKE2b-256 checksum
How to use checksums
c2ba376dc040fac8ef61b16d07cb0d9b66076445a75e94010c3e00c5c817c7ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

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