{"id":3862,"library":"aioconsole","title":"Asynchronous Console and Interfaces for asyncio","description":"aioconsole provides asynchronous equivalents to built-in functions like input(), print(), and exec() for use within asyncio applications. It includes an interactive loop for running an asynchronous Python console and a script (apython) to access asyncio code at runtime. The library is actively maintained, with regular updates to support newer Python versions.","status":"active","version":"0.8.2","language":"en","source_language":"en","source_url":"https://github.com/vxgmichel/aioconsole","tags":["asyncio","console","interactive","repl","input","output","async-io"],"install":[{"cmd":"pip install aioconsole","lang":"bash","label":"Install aioconsole"}],"dependencies":[{"reason":"Requires Python 3.8 or higher.","package":"python","optional":false}],"imports":[{"symbol":"ainput","correct":"from aioconsole import ainput"},{"symbol":"aprint","correct":"from aioconsole import aprint"},{"symbol":"aexec","correct":"from aioconsole import aexec"},{"note":"Added in v0.8.0. Asynchronous equivalent to eval().","symbol":"aeval","correct":"from aioconsole import aeval"},{"symbol":"interact","correct":"from aioconsole import interact"}],"quickstart":{"code":"import asyncio\nfrom aioconsole import ainput, aprint\n\nasync def main():\n    await aprint(\"Enter your name:\")\n    name = await ainput(\"> \")\n    await aprint(f\"Hello, {name}!\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n","lang":"python","description":"This quickstart demonstrates basic asynchronous input and output using `ainput` and `aprint`. Run this script and type in the console when prompted."},"warnings":[{"fix":"Upgrade your Python environment to 3.8 or newer.","message":"Python 3.7 support was deprecated in aioconsole v0.7.0. Subsequent versions (0.7.0+) require Python 3.8 or higher. Python 3.7 has reached its official End-of-Life.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Evaluate if a more powerful async-compatible REPL or prompting library better suits your advanced interactive needs.","message":"For complex interactive console applications or rich input prompts, more feature-rich libraries like IPython, ptpython, or prompt_toolkit (for ainput alternatives) are often recommended over aioconsole due to its inherent limitations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure you are using aioconsole v0.7.1 or newer for more robust handling of standard stream protection.","message":"Versions prior to 0.7.1 might have had issues with 'more robust protection against the closing of standard streams', which implies potential unexpected behavior if sys.stdin/sys.stdout were closed externally.","severity":"gotcha","affected_versions":"<0.7.1"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}