--- id: aiousbwatcher version: "1.1.2" license: MIT license_treatment: permissive maintenance: active --- # aiousbwatcher — Watch for USB devices to be plugged and unplugged License: permissive · Maintenance: active · Downloads: 104.3K/mo ## What it is and what it does aiousbwatcher is an asyncio-based library for monitoring USB device connections and disconnections in real time. It wraps file system event monitoring (via asyncinotify) to detect when USB devices are plugged in or removed, allowing Python applications to react immediately to hardware changes without polling. The package is designed for developers building tools that need to respond to USB device events—such as device managers, firmware updaters, or hardware-aware applications. It integrates with asyncio's event loop, making it suitable for concurrent applications. The library is in pre-alpha status, actively maintained, and supports modern Python versions (3.12 and 3.13). Use it for: - Detect when a specific USB device is connected to automatically initialize or configure it. - Monitor for device disconnections to clean up resources or alert users of unexpected removals. - Build a device manager UI that updates in real time as USB hardware is plugged and unplugged. - Trigger firmware updates or driver installations when compatible devices are detected. - Log USB device events for hardware audit or troubleshooting purposes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Watches for USB devices being plugged in and unplugged using asyncio, enabling event-driven responses to hardware changes. Yes, if you need asyncio-based USB device monitoring. Low install friction, permissive license, and active maintenance make it a straightforward choice. Pre-alpha status means the API may change, so pin the version in production. No known vulnerabilities. Verify that asyncinotify meets your platform requirements before committing. ## Install pip install aiousbwatcher uv add aiousbwatcher poetry add aiousbwatcher ## Installing aiousbwatcher Before you install: Low friction install with a single runtime dependency (asyncinotify). Active maintenance with a recent release (115 days ago) and current Python support (3.12, 3.13). License in practice: MIT license is permissive—you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install aiousbwatcher import asyncio from aiousbwatcher import USBWatcher async def main(): watcher = USBWatcher() async for event in watcher: print(event) Requires Python 3.12 or later; depends on asyncinotify for file system event monitoring. Verify before relying: - Whether asyncinotify is available on all operating systems or limited to Linux/Unix-like systems. - Specific USB device attributes (vendor ID, product ID, serial number) exposed by the watcher. - Whether the watcher works with USB hubs or only direct connections. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 104.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags usb device detection asyncio, watch usb plug unplug, asyncio usb watcher, usb hotplug monitoring, device insertion removal events, usb device listener, hardware change notifications, usb-hardware, asyncio, event-monitoring [View on SkillFed](https://skillfed.io/packages/aiousbwatcher) · [View on PyPI](https://pypi.org/project/aiousbwatcher/)