terminal
A terminal user interface.
Attributes¶
Functions¶
ask_multiselect
¶
ask_multiselect(
prompt: str,
choices: dict,
help: Optional[str] = None,
default: Any = None,
validator_func: Optional[Callable] = None,
**kwargs
) -> list[Any]
Ask a question with multiple answers.
ask_question
¶
ask_question(
prompt: str,
type: QuestionType = "str",
help: Optional[str] = None,
choices: Optional[dict] = None,
default: Any = None,
multiselect: bool = False,
validator_func: Optional[Callable] = None,
**kwargs
) -> Any
Ask the user a question and validate the answer.
ask_select
¶
ask_select(
prompt: str,
choices: dict,
help: Optional[str] = None,
default: Any = None,
validator_func: Optional[Callable] = None,
**kwargs
) -> Any
Ask a question with multiple choices.
make_validator
¶
make_validator(
validator_func: Callable,
) -> Optional[Callable]
Make a questionary validator from a callable.