{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/2"}],"enrichment":{"capability":"Registers cleanup functions to run when an asyncio event loop closes, similar to the standard library's atexit but tied to event loop lifecycle rather than interpreter exit.","skillfed_tags":["asyncio","lifecycle-management"],"use_cases":["Close database or cache connections when an asyncio application's event loop shuts down","Flush pending writes or cleanup temporary resources in async server applications","Register teardown logic in async test fixtures that need to run after each event loop","Clean up external resources (files, network sockets) tied to a specific event loop instance"],"what_it_does":"asyncio-atexit fills a gap in asyncio's lifecycle management by providing a way to register coroutines and synchronous functions that run when an event loop closes. The standard library's atexit module registers functions to run at interpreter shutdown, but asyncio applications often need cleanup tied to the event loop's lifecycle instead\u2014for example, closing database connections or flushing buffers when a specific loop terminates. This package lets you register those handlers and have them called automatically.\n\nThe package accepts both async and sync functions, and they are invoked when loop.close() is called. It's a thin, focused tool: no dependencies, works with Python 3.6 and later, and integrates directly into asyncio's shutdown sequence. The main constraint is that cleanup only runs if your application explicitly closes the loop\u2014it won't trigger on implicit cleanup or if the loop is abandoned.","worth_installing":"Yes, if you need event-loop-scoped cleanup in asyncio applications. Install friction is minimal and the license is permissive. The main caveat: the package has not been updated since 2022-04-26, so verify compatibility with your Python version and test that cleanup runs as expected in your specific event loop setup. No known vulnerabilities."},"id":"asyncio-atexit","links":{"html":"https://skillfed.io/packages/asyncio-atexit","md":"https://skillfed.io/packages/asyncio-atexit.md","pypi":"https://pypi.org/project/asyncio-atexit/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2022-04-26","license_spdx":null,"license_treatment":"permissive","name":"asyncio-atexit","python_support":"supports_current","summary":"Like atexit, but for asyncio"},"popularity":{"monthly_downloads":671892,"position":5403,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.1"}
