Registry / devops / aiousbwatcher

aiousbwatcher

JSON →
library1.1.2pypypi✓ verified 80d ago

An asynchronous Python library to watch for USB device plug/unplug events. Current version 1.1.2, requires Python >=3.12. Uses asyncio and pyudev on Linux.

pip install aiousbwatcher
INSTALL
IMPORT
SIG · AIOUSBWATCHER
A
aiousbwatcher
devopspythonv1.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AIOUSBWatcher
from aiousbwatcher import AIOUSBWatcher
from aiousbwatcher import USBDeviceWatcher

Starts an async iterator that yields device events (plug/unplug).

import asyncio from aiousbwatcher import USBDeviceWatcher async def main(): watcher = USBDeviceWatcher() async for device in watcher: print(f'Device {device.action}: {device.vendor_id}:{device.product_id}') asyncio.run(main())
Debug
Known issues
breakingRequires Python >=3.12. Does not work on Python 3.11 or earlier.
fix
Upgrade Python to 3.12+.
affects: <1.0.0
gotchaOnly works on Linux due to dependency on pyudev (udev). No Windows/macOS support.
fix
Use alternative libraries for cross-platform USB monitoring.
affects: all
gotchaThe async generator yields USBDeviceEvent objects, not simple strings. You must access attributes like .vendor_id and .product_id.
fix
Check the USBDeviceEvent class docs for available fields.
affects: all
Upgrade
Version history
1.1.2latest on PyPI · released Apr 21, 2026
Audit
Dependencies
pyudevrequiredRequired on Linux for udev device monitoring.
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources

No resource links recorded.

aiousbwatcher — pip install aiousbwatcher · libregistry