{"id":21544,"library":"loopmon","title":"loopmon","description":"Lightweight monitor library for asyncio event loop. Current version 1.0.1, maintenance mode with infrequent updates.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/isac322/loopmon","tags":["asyncio","monitoring","event-loop"],"install":[{"cmd":"pip install loopmon","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Main class to monitor the event loop.","symbol":"EventLoopMonitor","correct":"from loopmon import EventLoopMonitor"}],"quickstart":{"code":"import asyncio\nfrom loopmon import EventLoopMonitor\n\nasync def main():\n    monitor = EventLoopMonitor()\n    async with monitor:\n        await asyncio.sleep(1)\n    print(monitor.get_stats())\n\nasyncio.run(main())","lang":"python","description":"Basic usage of EventLoopMonitor to monitor an asyncio event loop."},"warnings":[{"fix":"Use `async with monitor:` block.","message":"Monitor must be used as async context manager; otherwise, it won't start monitoring.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Call get_stats() inside the `async with` block.","message":"get_stats() returns None if called outside the context manager block.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from loopmon import EventLoopMonitor`.","cause":"Incorrect import (e.g., `from loopmon.monitor import EventLoopMonitor`).","error":"AttributeError: module 'loopmon' has no attribute 'EventLoopMonitor'"},{"fix":"Ensure get_stats() is called inside the `async with monitor:` block.","cause":"Calling get_stats() before entering the context manager.","error":"RuntimeError: Monitor is not running"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}