ask
Symbol Details
class: ChoiceTyped
class ChoiceTyped:
name: str
value: ~T
description: str | None = None
checked: bool = False
| Field |
Type |
Default |
Since |
| name |
str |
- |
0.3.0 |
| value |
~T |
- |
0.3.0 |
| description |
str | None |
None |
0.3.0 |
| checked |
bool |
False |
0.3.0 |
Changes
| Version |
Change |
| 0.3.0 |
Made public |
Changes
| Version |
Change |
| 0.3.0 |
Made public |
class: NewHandlerChoice
class NewHandlerChoice:
constructor: Callable[[str], ~T]
new_prompt: str
| Field |
Type |
Default |
Since |
| constructor |
Callable[[str], ~T] |
- |
0.3.0 |
| new_prompt |
str |
- |
0.3.0 |
Changes
| Version |
Change |
| 0.3.0 |
Made public |
class: PromptMatch
class PromptMatch:
response: str | None = None
responses: list[str] = ...
substring: str = ""
exact: str = ""
max_matches: int = 1
matches_so_far: int = 0
| Field |
Type |
Default |
Since |
| response |
str | None |
None |
0.3.0 |
| responses |
list[str] |
... |
0.3.0 |
| substring |
str |
'' |
0.3.0 |
| exact |
str |
'' |
0.3.0 |
| max_matches |
int |
1 |
0.3.0 |
| matches_so_far |
int |
0 |
0.3.0 |
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: confirm
def confirm(prompt_text: str, *, default: bool | None = None) -> bool: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
class: force_interactive
class force_interactive:
settings: AskShellSettings = ...
| Field |
Type |
Default |
Since |
| settings |
AskShellSettings |
... |
0.3.0 |
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: select_dict
def select_dict(
prompt_text: str, choices: dict[str, ~T], *, default: str | None = None, options: SelectOptions | None = None
) -> ~T: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: select_list
def select_list(
prompt_text: str, choices: list[str], *, default: str | None = None, options: SelectOptions | None = None
) -> str: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: select_list_choice
def select_list_choice(
prompt_text: str, choices: list[ChoiceTyped[~T]], *, default: ~T | None = None, options: SelectOptions | None = None
) -> ~T: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: select_list_multiple
def select_list_multiple(
prompt_text: str, choices: list[str], *, default: list[str] | None = None, options: SelectOptions | None = None
) -> list[str]: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
function: select_list_multiple_choices
def select_list_multiple_choices(
prompt_text: str,
choices: list[ChoiceTyped[~T]],
default: list[~T] | None = None,
*,
options: SelectOptions | None = None,
) -> list[~T]: ...
Changes
| Version |
Change |
| 0.3.0 |
Made public |
exception: PromptSessionLockedError
class PromptSessionLockedError(Exception): ...
Changes
| Version |
Change |
| 0.11.0 |
Made public |