Aiosetups !full! ⚡ Proven

If you meant (singular) — also not an official package. Final answer If you need code for async initialization patterns , the above AsyncSetup class or asynccontextmanager wrapper is a solid solution. If you actually meant a specific library, please clarify the name or link, and I’ll provide exact content.

Below is a practical, ready-to-use content snippet / documentation-style explanation. aiosetups is a conceptual / utility module that provides reusable patterns to initialize, manage, and gracefully shut down async resources. Typical use case Instead of manually managing: aiosetups

def get(self, name: str): return self._resources.get(name) async def init_postgres(): # Imagine asyncpg.connect(...) return "conn": "fake pg connection" If you meant (singular) — also not an official package

def add(self, name: str, init_func, cleanup_func=None): async def _init(): self._resources[name] = await init_func() self._init_tasks.append(_init) if cleanup_func: async def _clean(): await cleanup_func(self._resources[name]) self._cleanup_tasks.insert(0, _clean) # reverse order cleanup Below is a practical, ready-to-use content snippet /