Questo

raw JSON →
0.4.2 verified Fri May 01 auth: no python

Questo is a Python library for building extensible and modular CLI prompt elements, such as text inputs, confirmations, and lists with spinners and progress bars. Current version is 0.4.2, released with a relaxed Python constraint. The project is actively maintained with occasional releases.

pip install questo
error ImportError: cannot import name 'TextPrompt' from 'questo'
cause Using legacy import path from older versions or incorrect spelling.
fix
Use from questo import TextPrompt.
error TypeError: 'str' object is not callable
cause Assigning the result of `ask()` to a variable named `input` overwrites built-in function.
fix
Rename the variable, e.g., user_input = TextPrompt(...).ask().
breaking Import paths changed in v0.2.0 from module-level (e.g., questo.prompts.TextPrompt) to top-level (questo.TextPrompt).
fix Use `from questo import TextPrompt` instead of `from questo.prompts import TextPrompt`.
deprecated The `ask()` method returns a string for TextPrompt, but other prompts like ConfirmPrompt return bool or int. Mixing types can cause unexpected output.
fix Check the prompt type documentation for return types.
gotcha Questo requires Python >=3.7.8, but some prompt elements may not work on Windows if using Rich features without proper terminal support.
fix Ensure your terminal supports ANSI escape codes or use a compatible terminal emulator.

Simple example of using TextPrompt to get user input.

from questo import TextPrompt

name = TextPrompt("What is your name?").ask()
print(f"Hello, {name}!")