API Reference

The full public API of usb_devices.

class usb_devices.USBDevice(id_str: str)[source]

Bases: object

id_str
bus_port_id
bus_id
port_id
interface_id
manufacturer: str | None
product: str | None
product_id: str | None
vendor_id: str | None
dev_num: str | None
path
usb_devfs_path: Path | None
async async_setup() None[source]

Set up a USB device.

async async_reset() bool[source]

Reset the USB device.

setup() None[source]

Read the USB device.

reset() bool[source]

Reset the USB device.

class usb_devices.BluetoothDevice(hci: int)[source]

Bases: object

hci
path
device_path
usb_device: USBDevice | None
async async_setup() None[source]

Set up a Bluetooth device.

async async_reset() bool[source]

Reset a Bluetooth device.

reset() bool[source]

Reset a Bluetooth device.

setup() None[source]

Create a USBDevice object.

exception usb_devices.NotAUSBDeviceError[source]

Bases: ValueError

Raised when a device is not a USB device.