What is aiomonitor?
mainaiomonitor is a Python 3.9+ module designed to add monitoring and CLI capabilities to asyncio applications. It works by running a task monitor in a separate thread that runs concurrently with your asyncio loop (or uvloop). This allows you to inspect the loop and provides debugging capabilities without interfering with the main application logic.
Key features include:
- Telnet server: Provides insights into your application's internal operations.
- Task management: Commands to list, cancel, and trace running
asynciotasks. - Python REPL: Provides a Python console (via
aioconsole) that executes commands directly inside your running event loop, allowing you to inspect the application state. - GUI: A web-based interface to inspect and cancel tasks.
- Extensibility: You can add your own commands using
click.