Registry / http-networking / aioconsole

aioconsole

JSON →
library0.8.2pypypi✓ verified 23d ago

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.

pip install aioconsole
INSTALL
IMPORT
SIG · AIOCONSOLE
A
aioconsole
http-networkingpythonv0.8.2
Install
1.5s avg
Import
308ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.2 · 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.326s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.290s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

ainput
from aioconsole import ainput
aprint
from aioconsole import aprint
aexec
from aioconsole import aexec
aeval
from aioconsole import aeval
Added in v0.8.0. Asynchronous equivalent to eval().
interact
from aioconsole import interact

This quickstart demonstrates basic asynchronous input and output using `ainput` and `aprint`. Run this script and type in the console when prompted.

import asyncio from aioconsole import ainput, aprint async def main(): await aprint("Enter your name:") name = await ainput("> ") await aprint(f"Hello, {name}!") if __name__ == "__main__": asyncio.run(main())
apython --version
Debug
Known issues
breakingPython 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.
fix
Upgrade your Python environment to 3.8 or newer.
affects: >=0.7.0
gotchaFor 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.
fix
Evaluate if a more powerful async-compatible REPL or prompting library better suits your advanced interactive needs.
affects: All versions
gotchaVersions 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.
fix
Ensure you are using aioconsole v0.7.1 or newer for more robust handling of standard stream protection.
affects: <0.7.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aioconsole'
The 'aioconsole' package is not installed in the Python environment.
fix
pip install aioconsole
ImportError: cannot import name 'ainput' from 'aioconsole'
The 'ainput' function is not available in the installed version of 'aioconsole'.
fix
Ensure you have the latest version of 'aioconsole' installed: pip install --upgrade aioconsole
AttributeError: module 'aioconsole' has no attribute 'apython'
The 'apython' script is not an attribute of the 'aioconsole' module; it's a separate command-line tool.
fix
Run 'apython' directly from the command line, not as an import in Python.
TypeError: 'coroutine' object is not callable
Attempting to call an asynchronous function without awaiting it.
fix
Use 'await' when calling asynchronous functions: result = await aioconsole.ainput('Prompt: ')
RuntimeError: This event loop is already running
Trying to run an event loop that is already running, often in interactive environments.
fix
Use 'await' directly in interactive environments or manage the event loop appropriately in scripts.
Upgrade
Version history
0.8.2latest on PyPI · released Oct 14, 2025
Audit
Dependencies
pythonrequiredRequires Python 3.8 or higher.
Agent activity
53 hits · last 30 days
node
42
OpenAI (training)
1
Resources
aioconsole — pip install aioconsole · libregistry