Qprompt

raw JSON →
0.16.3 verified Fri May 01 auth: no python maintenance

A Python library for quick CLI user prompts, input, and menus. Current version 0.16.3, last released in 2021. Maintenance mode with no recent activity.

pip install qprompt
error ImportError: cannot import name 'prompt' from 'qprompt'
cause qprompt does not export prompt directly; it's a submodule.
fix
Use 'from qprompt import prompt' (note lowercase p).
error AttributeError: module 'qprompt' has no attribute 'menu'
cause Trying to access submodule via dot notation without importing.
fix
Use 'from qprompt import menu' or 'from qprompt.menu import Menu'.
gotcha The library is in maintenance mode; last release 2021-11-19. No known breaking changes in recent versions.
fix Consider using a more modern alternative like questionary or click.
gotcha prompt() strips trailing newline from input; be aware when handling empty input.
fix Use prompt() and handle empty string explicitly.
deprecated Old submodule imports like from qprompt.menu import Menu may break; all classes are re-exported at package level since 0.16.0.
fix Use 'from qprompt import Menu' instead.

Simple text prompt example.

from qprompt import prompt

name = prompt('Enter your name: ')
print(f'Hello, {name}!')