aiomisc
raw JSON → 18.0.19 verified Fri May 01 auth: no python
Miscellaneous utilities for asyncio, including connection pools, retry logic, periodic callbacks, and CLI entrypoints. Current version 18.0.19, supports Python >=3.11. Releases follow semantic versioning with occasional breaking changes in internal modules.
pip install aiomisc Common errors
error ModuleNotFoundError: No module named 'aiomisc.entrypoint' ↓
cause Attempting to import from a submodule that no longer exists or has been restructured.
fix
Use 'from aiomisc import entrypoint' or 'from aiomisc import *' to get the correct entrypoint symbol.
error AttributeError: module 'aiomisc' has no attribute 'io' ↓
cause In aiomisc 16.3+, the io module is no longer a public top-level attribute. It was moved or removed.
fix
If you need IO utilities, use standard asyncio streams or check the changelog for replacement APIs.
error TypeError: entrypoint() missing required positional argument (or similar) ↓
cause Using entrypoint incorrectly without arguments or with deprecated parameters.
fix
Use 'with entrypoint() as loop:' or 'with entrypoint(*args, **kwargs) as loop:' as per the documentation.
Warnings
breaking In version 16.3, migration to poetry broke some non-public imports, mainly typing and the aiomisc.io module. If you rely on internal modules like aiomisc.io, your code may need updating. ↓
fix Use only public APIs imported from top-level aiomisc. For aiomisc.io, check changelog for migration details.
breaking aiomisc 18.x drops support for Python <3.11. If your project uses Python 3.10 or earlier, you must upgrade Python or pin to aiomisc<18. ↓
fix Upgrade Python to >=3.11 or install aiomisc==17.x
gotcha The entrypoint context manager may require proper event loop closure. Forgetting to use it can lead to resource warnings. ↓
fix Always use 'with entrypoint() as loop:' instead of manually calling loop.close()
Install
pip install 'aiomisc[uvloop,thread-pool]' Imports
- AsyncEntrypoint wrong
from aiomisc.entrypoint import AsyncEntrypointcorrectfrom aiomisc import entrypoint - PeriodicCallback wrong
from aiomisc.periodic import PeriodicCallbackcorrectfrom aiomisc import PeriodicCallback - retry
from aiomisc import retry
Quickstart
import asyncio
from aiomisc import entrypoint
async def main():
print('Hello, aiomisc!')
return 0
if __name__ == '__main__':
with entrypoint() as loop:
loop.run_until_complete(main())