Skip to content

InquirerSelect

Bases: InquirerWidget

A select widget that allows a single selection from a list of choices.

__init__(message, choices, default=None, mandatory=True)

Parameters:

Name Type Description Default
message str

The prompt message to display.

required
choices list[str | Choice]

A list of choices to present to the user.

required
default str | Choice | None

The default choice to pre-select.

None
mandatory bool

Whether a response is mandatory.

True