aiousbwatcher
Watch for USB devices to be plugged and unplugged
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 on this page — 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
aiousbwatcher on PyPI
pip
pip install aiousbwatcheruv
uv add aiousbwatcherpoetry
poetry add aiousbwatcherInstalling 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 the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — asyncinotify |
| Maintenance | actively maintained — 115 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 104,270/month — #12,756 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiousbwatcher-1.1.2-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
aiodhcpwatcherWatches for DHCP packets on the network using…
permissive · top 15,000 on PyPI
async-interruptProvides an asyncio context manager that…
permissive · top 5,000 on PyPI
aioouiPerforms asynchronous lookups of…
permissive · top 15,000 on PyPI
aiozoneinfoFetches timezone information asynchronously…
permissive · top 15,000 on PyPI
usb-devicesMaps, describes, and resets USB devices on a…
permissive · top 15,000 on PyPI
aiovlcControl VLC media player over a telnet…
permissive · top 15,000 on PyPI
unifi-discoveryDiscovers Unifi devices on a network using…
permissive · top 15,000 on PyPI
govee-bleProvides Python bindings to discover, connect…
permissive · top 15,000 on PyPI
bluetooth-adaptersEnumerates and locates Bluetooth adapters on a…
permissive · top 15,000 on PyPI
joulescopeJoulescope is a Python driver for the…
permissive · top 15,000 on PyPI