InquirerSelect
Bases: InquirerChoicesWidget
A select widget that allows a single selection from a list of choices.
__init__(message, choices_factory, name=None, default=None, mandatory=True, height=None)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
The prompt message to display. |
required |
choices_factory
|
list[str | Choice] | Callable[[], Awaitable[list[str | Choice]]]
|
A list of choices or a callable that returns a list of choices. |
required |
default
|
str | Choice | None
|
The default choice to pre-select. |
None
|
mandatory
|
bool
|
Whether a response is mandatory. |
True
|
height
|
int | str | None
|
If None, for inline apps the height will be determined based on the number of choices. |
None
|