Registry / observability / loopmon

loopmon

JSON →
library1.0.1pypypi✓ verified 85d ago

Lightweight monitor library for asyncio event loop. Current version 1.0.1, maintenance mode with infrequent updates.

pip install loopmon
INSTALL
IMPORT
SIG · LOOPMON
L
loopmon
observabilitypythonv1.0.1
Install
1.6s avg
Import
201ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.216s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.186s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

EventLoopMonitor
from loopmon import EventLoopMonitor
Main class to monitor the event loop.

Basic usage of EventLoopMonitor to monitor an asyncio event loop.

import asyncio from loopmon import EventLoopMonitor async def main(): monitor = EventLoopMonitor() async with monitor: await asyncio.sleep(1) print(monitor.get_stats()) asyncio.run(main())
Debug
Known issues
gotchaMonitor must be used as async context manager; otherwise, it won't start monitoring.
fix
Use `async with monitor:` block.
affects: >=1.0.0
gotchaget_stats() returns None if called outside the context manager block.
fix
Call get_stats() inside the `async with` block.
affects: >=1.0.0
Errors
Common errors & fixes
AttributeError: module 'loopmon' has no attribute 'EventLoopMonitor'
Incorrect import (e.g., `from loopmon.monitor import EventLoopMonitor`).
fix
Use `from loopmon import EventLoopMonitor`.
RuntimeError: Monitor is not running
Calling get_stats() before entering the context manager.
fix
Ensure get_stats() is called inside the `async with monitor:` block.
Upgrade
Version history
1.0.1latest on PyPI · released May 22, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
loopmon — pip install loopmon · libregistry