|
|
None | __init__ (self, TextType prompt="", *Optional[Console] console=None, bool password=False, Optional[List[str]] choices=None, bool show_default=True, bool show_choices=True) |
| |
|
Union[DefaultType, PromptType] | ask (cls, TextType prompt="", *Optional[Console] console=None, bool password=False, Optional[List[str]] choices=None, bool show_default=True, bool show_choices=True, DefaultType default, Optional[TextIO] stream=None) |
| |
|
PromptType | ask (cls, TextType prompt="", *Optional[Console] console=None, bool password=False, Optional[List[str]] choices=None, bool show_default=True, bool show_choices=True, Optional[TextIO] stream=None) |
| |
| Any | ask (cls, TextType prompt="", *Optional[Console] console=None, bool password=False, Optional[List[str]] choices=None, bool show_default=True, bool show_choices=True, Any default=..., Optional[TextIO] stream=None) |
| |
| Text | render_default (self, DefaultType default) |
| |
| Text | make_prompt (self, DefaultType default) |
| |
| str | get_input (cls, Console console, TextType prompt, bool password, Optional[TextIO] stream=None) |
| |
| bool | check_choice (self, str value) |
| |
| PromptType | process_response (self, str value) |
| |
| None | on_validate_error (self, str value, InvalidResponse error) |
| |
| None | pre_prompt (self) |
| |
|
PromptType | __call__ (self, *Optional[TextIO] stream=None) |
| |
|
Union[PromptType, DefaultType] | __call__ (self, *DefaultType default, Optional[TextIO] stream=None) |
| |
| Any | __call__ (self, *Any default=..., Optional[TextIO] stream=None) |
| |
|
| console |
| |
|
| prompt |
| |
|
| password |
| |
|
| choices |
| |
|
| show_default |
| |
|
| show_choices |
| |
|
| response_type |
| |
|
| prompt_suffix |
| |
|
| validate_error_message |
| |
|
| illegal_choice_message |
| |
A prompt that returns a float.
Example:
>>> temperature = FloatPrompt.ask("Enter desired temperature")