inquirer-textual 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.github/workflows/release.yml +1 -1
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/PKG-INFO +42 -3
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/README.md +38 -1
- inquirer_textual-0.4.0/docs/examples/prompts/checkbox.gif +0 -0
- inquirer_textual-0.4.0/docs/examples/prompts/editor.gif +0 -0
- inquirer_textual-0.4.0/docs/examples/prompts/editor.md +11 -0
- inquirer_textual-0.4.0/docs/examples/prompts/editor.tape +17 -0
- inquirer_textual-0.4.0/docs/examples/prompts/external.gif +0 -0
- inquirer_textual-0.4.0/docs/examples/prompts/external.md +12 -0
- inquirer_textual-0.4.0/docs/examples/prompts/external.tape +24 -0
- inquirer_textual-0.4.0/docs/examples/prompts/path.gif +0 -0
- inquirer_textual-0.4.0/docs/examples/prompts/path.md +11 -0
- inquirer_textual-0.4.0/docs/examples/prompts/path.tape +10 -0
- inquirer_textual-0.4.0/docs/examples/prompts/pattern.gif +0 -0
- inquirer_textual-0.4.0/docs/examples/prompts/pattern.md +12 -0
- inquirer_textual-0.4.0/docs/examples/prompts/pattern.tape +12 -0
- inquirer_textual-0.4.0/docs/faq.md +11 -0
- inquirer_textual-0.4.0/docs/getting-started/index.md +39 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_multi_prompt.gif +0 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_multi_prompt.py +9 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_multi_prompt.tape +14 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompt.gif +0 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompt.py +5 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompt.tape +10 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompts.gif +0 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompts.py +6 -0
- inquirer_textual-0.4.0/docs/getting-started/simple_text_prompts.tape +14 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/index.md +11 -2
- inquirer_textual-0.4.0/docs/reference/editor.md +3 -0
- inquirer_textual-0.4.0/docs/reference/path.md +3 -0
- inquirer_textual-0.4.0/docs/reference/pattern.md +3 -0
- inquirer_textual-0.4.0/docs/themes/catppuccin_mocha.gif +0 -0
- inquirer_textual-0.4.0/docs/themes/catppuccin_mocha.tape +27 -0
- inquirer_textual-0.4.0/docs/themes/index.md +18 -0
- inquirer_textual-0.4.0/docs/themes/nord.gif +0 -0
- inquirer_textual-0.4.0/docs/themes/nord.tape +27 -0
- inquirer_textual-0.4.0/docs/themes/solarized_light.gif +0 -0
- inquirer_textual-0.4.0/docs/themes/solarized_light.tape +27 -0
- inquirer_textual-0.4.0/docs/themes/textual_dark.gif +0 -0
- inquirer_textual-0.4.0/docs/themes/textual_dark.tape +27 -0
- inquirer_textual-0.4.0/docs/themes/textual_light.gif +0 -0
- inquirer_textual-0.4.0/docs/themes/textual_light.tape +27 -0
- inquirer_textual-0.4.0/examples/alternatives/inquirerpy/main.py +34 -0
- inquirer_textual-0.4.0/examples/alternatives/python-inquirer/main.py +43 -0
- inquirer_textual-0.4.0/examples/pizza.py +21 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/prompt_checkbox.py +3 -4
- inquirer_textual-0.2.0/examples/prompt_text.py → inquirer_textual-0.4.0/examples/prompt_editor.py +1 -1
- inquirer_textual-0.4.0/examples/prompt_external.py +51 -0
- inquirer_textual-0.4.0/examples/prompt_multi.py +18 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/prompt_number.py +2 -2
- inquirer_textual-0.4.0/examples/prompt_path.py +6 -0
- inquirer_textual-0.4.0/examples/prompt_pattern.py +6 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/prompt_secret.py +2 -2
- inquirer_textual-0.4.0/examples/prompt_select.py +6 -0
- inquirer_textual-0.4.0/examples/prompt_text.py +5 -0
- inquirer_textual-0.4.0/examples/shortcuts.py +11 -0
- inquirer_textual-0.4.0/examples/themes.py +36 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/InquirerApp.py +24 -22
- inquirer_textual-0.4.0/inquirer_textual/common/Answer.py +22 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/common/Choice.py +3 -0
- inquirer_textual-0.4.0/inquirer_textual/common/ChoiceLabel.py +27 -0
- inquirer_textual-0.4.0/inquirer_textual/common/InquirerResult.py +24 -0
- inquirer_textual-0.2.0/inquirer_textual/common/PromptMessage.py → inquirer_textual-0.4.0/inquirer_textual/common/Prompt.py +3 -3
- inquirer_textual-0.4.0/inquirer_textual/common/defaults.py +24 -0
- inquirer_textual-0.4.0/inquirer_textual/prompts.py +88 -0
- inquirer_textual-0.4.0/inquirer_textual/version.py +1 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerCheckbox.py +30 -22
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerConfirm.py +31 -11
- inquirer_textual-0.4.0/inquirer_textual/widgets/InquirerEditor.py +72 -0
- inquirer_textual-0.4.0/inquirer_textual/widgets/InquirerMulti.py +45 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerNumber.py +20 -12
- inquirer_textual-0.4.0/inquirer_textual/widgets/InquirerPath.py +95 -0
- inquirer_textual-0.4.0/inquirer_textual/widgets/InquirerPattern.py +175 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerSecret.py +5 -6
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerSelect.py +32 -28
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerText.py +10 -7
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/InquirerWidget.py +8 -2
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/mkdocs.yml +9 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/pyproject.toml +18 -4
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/__snapshots__/test_InquirerApp/test_snapshot_shortcut.svg +2 -2
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/__snapshots__/test_InquirerApp/test_snapshot_shortcut_no_description.svg +2 -2
- inquirer_textual-0.4.0/tests/common/__snapshots__/test_ChoiceLabel/test_snapshot_with_pattern.svg +151 -0
- inquirer_textual-0.4.0/tests/common/__snapshots__/test_ChoiceLabel/test_snapshot_with_pointer.svg +150 -0
- inquirer_textual-0.4.0/tests/common/__snapshots__/test_ChoiceLabel/test_snapshot_without_pointer.svg +150 -0
- inquirer_textual-0.4.0/tests/common/test_ChoiceLabel.py +37 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/test_InquirerApp.py +1 -0
- inquirer_textual-0.4.0/tests/widgets/__init__.py +0 -0
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_second_input.svg → inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerCheckbox/test_snapshot_select_value.svg +3 -3
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerEditor/test_snapshot.svg +152 -0
- {inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerText → inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti}/test_snapshot.svg +1 -1
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fifth_input.svg +152 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fifth_input_pick_default.svg +153 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fourth_input.svg +152 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_second_input.svg +153 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_third_input.svg +153 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerNumber/test_snapshot.svg +1 -1
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fourth_input.svg → inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerPath/test_snapshot.svg +4 -2
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerPath/test_snapshot_with_default_value.svg +154 -0
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_third_input.svg → inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerPath/test_validation_failure.svg +6 -4
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerPattern/test_snapshot_pattern_search.svg +155 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerPattern/test_snapshot_select.svg +152 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerSecret/test_snapshot.svg +1 -1
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerSecret/test_snapshot_hide_input.svg +1 -1
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerSelect/test_snapshot_not_mandatory.svg +152 -0
- inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerSelect/test_snapshot_select.svg +152 -0
- {inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti → inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerText}/test_snapshot.svg +1 -1
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerText/test_snapshot_with_default_value.svg +1 -1
- inquirer_textual-0.4.0/tests/widgets/test_InquirerCheckbox.py +62 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/test_InquirerConfirm.py +12 -0
- inquirer_textual-0.4.0/tests/widgets/test_InquirerEditor.py +23 -0
- inquirer_textual-0.4.0/tests/widgets/test_InquirerExternal.py +35 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/test_InquirerMulti.py +36 -31
- inquirer_textual-0.4.0/tests/widgets/test_InquirerNumber.py +23 -0
- inquirer_textual-0.4.0/tests/widgets/test_InquirerPath.py +44 -0
- inquirer_textual-0.4.0/tests/widgets/test_InquirerPattern.py +63 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/test_InquirerSecret.py +12 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/test_InquirerSelect.py +28 -2
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/test_InquirerText.py +14 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/uv.lock +58 -406
- inquirer_textual-0.2.0/docs/examples/prompts/checkbox.gif +0 -0
- inquirer_textual-0.2.0/docs/faq.md +0 -6
- inquirer_textual-0.2.0/examples/prompt_multi.py +0 -18
- inquirer_textual-0.2.0/examples/prompt_select.py +0 -6
- inquirer_textual-0.2.0/examples/shortcuts.py +0 -7
- inquirer_textual-0.2.0/inquirer_textual/common/ChoiceLabel.py +0 -18
- inquirer_textual-0.2.0/inquirer_textual/common/Result.py +0 -15
- inquirer_textual-0.2.0/inquirer_textual/prompts.py +0 -76
- inquirer_textual-0.2.0/inquirer_textual/version.py +0 -1
- inquirer_textual-0.2.0/inquirer_textual/widgets/InquirerMulti.py +0 -46
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fifth_input.svg +0 -152
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerMulti/test_snapshot_fifth_input_pick_default.svg +0 -152
- inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerSelect/test_snapshot_not_mandatory.svg +0 -152
- inquirer_textual-0.2.0/tests/widgets/test_InquirerCheckbox.py +0 -31
- inquirer_textual-0.2.0/tests/widgets/test_InquirerNumber.py +0 -9
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.capm.yml +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.github/dependabot.yml +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.github/workflows/code-analysis.yml +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.github/workflows/documentation.yml +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.github/workflows/main.yml +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/.gitignore +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/CHANGELOG.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/LICENSE +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/assets/favicon.ico +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/assets/logo-light.png +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/apps/app.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/apps/app.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/apps/app.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/checkbox.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/checkbox.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/confirm.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/confirm.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/confirm.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/multi.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/multi.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/multi.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/number.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/number.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/number.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/secret.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/secret.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/secret.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/select.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/select.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/select.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/text.gif +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/text.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/examples/prompts/text.tape +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/checkbox.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/confirm.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/multi.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/number.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/secret.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/select.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/docs/reference/text.md +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/app.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/app_header.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/app_shortcuts.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/prompt_confirm.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/examples/validator.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/__init__.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/common/ChoiceCheckboxLabel.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/common/InquirerHeader.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/common/Shortcut.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/common/__init__.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/inquirer_textual/widgets/__init__.py +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/__init__.py +0 -0
- {inquirer_textual-0.2.0/tests/widgets → inquirer_textual-0.4.0/tests/common}/__init__.py +0 -0
- /inquirer_textual-0.2.0/tests/widgets/__snapshots__/test_InquirerCheckbox/test_snapshot.svg → /inquirer_textual-0.4.0/tests/widgets/__snapshots__/test_InquirerCheckbox/test_snapshot_select_items.svg +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerConfirm/test_snapshot.svg +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerConfirm/test_snapshot_custom_chars.svg +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerConfirm/test_snapshot_default_yes.svg +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerSelect/test_snapshot_fullscreen.svg +0 -0
- {inquirer_textual-0.2.0 → inquirer_textual-0.4.0}/tests/widgets/__snapshots__/test_InquirerSelect/test_snapshot_mandatory.svg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: inquirer-textual
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Inquirer based on Textual
|
|
5
5
|
Project-URL: Changelog, https://github.com/robvanderleek/inquirer-textual/blob/master/CHANGELOG.md
|
|
6
6
|
Project-URL: Documentation, https://robvanderleek.github.io/inquirer-textual/
|
|
@@ -9,7 +9,9 @@ Author-email: Rob van der Leek <robvanderleek@gmail.com>
|
|
|
9
9
|
License-Expression: GPL-3.0-or-later
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Python: <3.15,>=3.9
|
|
12
|
-
Requires-Dist: textual>=
|
|
12
|
+
Requires-Dist: textual>=7.1.0
|
|
13
|
+
Provides-Extra: examples
|
|
14
|
+
Requires-Dist: textual-slider>=0.2.0; extra == 'examples'
|
|
13
15
|
Description-Content-Type: text/markdown
|
|
14
16
|
|
|
15
17
|
# Inquirer-Textual
|
|
@@ -36,11 +38,20 @@ Description-Content-Type: text/markdown
|
|
|
36
38
|
|
|
37
39
|
All terminal programs start small. Some stay small, and some become incredibly
|
|
38
40
|
big. The goal of this Python library is to make user input simple for small
|
|
39
|
-
programs,
|
|
41
|
+
programs, while enabling a smooth transition to a comprehensive UI library as
|
|
40
42
|
your program grows.
|
|
41
43
|
|
|
42
44
|
Read the [documentation here](https://robvanderleek.github.io/inquirer-textual/)
|
|
43
45
|
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
Create and activate a virtual environment (for example with
|
|
49
|
+
[uv](https://docs.astral.sh/uv/)), and then install this package:
|
|
50
|
+
|
|
51
|
+
```shell
|
|
52
|
+
pip install inquirer-textual
|
|
53
|
+
```
|
|
54
|
+
|
|
44
55
|
## Development
|
|
45
56
|
|
|
46
57
|
Add this library as an editable local dependency to another project using `uv`:
|
|
@@ -48,3 +59,31 @@ Add this library as an editable local dependency to another project using `uv`:
|
|
|
48
59
|
```shell
|
|
49
60
|
uv add --editable <path-to-inquirer-textual>
|
|
50
61
|
```
|
|
62
|
+
|
|
63
|
+
### Textual console
|
|
64
|
+
|
|
65
|
+
1. Open the Textual Development Console:
|
|
66
|
+
|
|
67
|
+
```shell
|
|
68
|
+
uv run textual console
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. Run application in development mode:
|
|
72
|
+
|
|
73
|
+
```shell
|
|
74
|
+
uv run textual run --dev examples/prompt_pattern.py
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Static documentation
|
|
78
|
+
|
|
79
|
+
Generating the static documentation:
|
|
80
|
+
|
|
81
|
+
```shell
|
|
82
|
+
uv run mkdocs build
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Viewing the static documentation:
|
|
86
|
+
|
|
87
|
+
```shell
|
|
88
|
+
uv run mkdocs serve
|
|
89
|
+
```
|
|
@@ -22,11 +22,20 @@
|
|
|
22
22
|
|
|
23
23
|
All terminal programs start small. Some stay small, and some become incredibly
|
|
24
24
|
big. The goal of this Python library is to make user input simple for small
|
|
25
|
-
programs,
|
|
25
|
+
programs, while enabling a smooth transition to a comprehensive UI library as
|
|
26
26
|
your program grows.
|
|
27
27
|
|
|
28
28
|
Read the [documentation here](https://robvanderleek.github.io/inquirer-textual/)
|
|
29
29
|
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Create and activate a virtual environment (for example with
|
|
33
|
+
[uv](https://docs.astral.sh/uv/)), and then install this package:
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
pip install inquirer-textual
|
|
37
|
+
```
|
|
38
|
+
|
|
30
39
|
## Development
|
|
31
40
|
|
|
32
41
|
Add this library as an editable local dependency to another project using `uv`:
|
|
@@ -34,3 +43,31 @@ Add this library as an editable local dependency to another project using `uv`:
|
|
|
34
43
|
```shell
|
|
35
44
|
uv add --editable <path-to-inquirer-textual>
|
|
36
45
|
```
|
|
46
|
+
|
|
47
|
+
### Textual console
|
|
48
|
+
|
|
49
|
+
1. Open the Textual Development Console:
|
|
50
|
+
|
|
51
|
+
```shell
|
|
52
|
+
uv run textual console
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. Run application in development mode:
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
uv run textual run --dev examples/prompt_pattern.py
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Static documentation
|
|
62
|
+
|
|
63
|
+
Generating the static documentation:
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
uv run mkdocs build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Viewing the static documentation:
|
|
70
|
+
|
|
71
|
+
```shell
|
|
72
|
+
uv run mkdocs serve
|
|
73
|
+
```
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Output docs/examples/prompts/editor.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/prompt_editor.py"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Enter
|
|
8
|
+
Sleep 2s
|
|
9
|
+
Escape
|
|
10
|
+
Sleep 1s
|
|
11
|
+
Type "iHello world!"
|
|
12
|
+
Sleep 2s
|
|
13
|
+
Escape
|
|
14
|
+
Sleep 1s
|
|
15
|
+
Type ":wq"
|
|
16
|
+
Enter
|
|
17
|
+
Sleep 3s
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# External
|
|
2
|
+
|
|
3
|
+
Embed external widgets in a prompt, for example a slider from
|
|
4
|
+
[TomJGooding/textual-slider](https://github.com/TomJGooding/textual-slider).
|
|
5
|
+
|
|
6
|
+
## Example
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
--8<-- "examples/prompt_external.py"
|
|
12
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Output docs/examples/prompts/external.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/prompt_external.py"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Right
|
|
8
|
+
Sleep 0.1s
|
|
9
|
+
Right
|
|
10
|
+
Sleep 0.1s
|
|
11
|
+
Right
|
|
12
|
+
Sleep 0.1s
|
|
13
|
+
Right
|
|
14
|
+
Sleep 0.1s
|
|
15
|
+
Right
|
|
16
|
+
Sleep 0.1s
|
|
17
|
+
Right
|
|
18
|
+
Sleep 0.1s
|
|
19
|
+
Right
|
|
20
|
+
Sleep 0.1s
|
|
21
|
+
Right
|
|
22
|
+
Sleep 1s
|
|
23
|
+
Enter
|
|
24
|
+
Sleep 3s
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Frequently Asked Questions
|
|
2
|
+
|
|
3
|
+
## Q. How does Inquirer-Textual compare to ...
|
|
4
|
+
|
|
5
|
+
**[InquirerPy](https://github.com/kazhala/InquirerPy)**
|
|
6
|
+
|
|
7
|
+
**[python-inquirer](https://github.com/magmax/python-inquirer)**
|
|
8
|
+
|
|
9
|
+
**[Inquirer.js](https://github.com/SBoudrias/Inquirer.js)**
|
|
10
|
+
|
|
11
|
+
The OG of Inquirer libraries, written in TypeScript.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
The first step is to install Inquirer-Textual.
|
|
6
|
+
|
|
7
|
+
Inside a virtual environemnt, this library can be installed with:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
pip install inquirer-textual
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Simple text prompt
|
|
14
|
+
|
|
15
|
+
The prompt API is very straightforward, for example to get a text input:
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
--8<-- "docs/getting-started/simple_text_prompt.py"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
## Multiple prompts
|
|
24
|
+
|
|
25
|
+
By calling the prompt API multiple times, a form-like inquiry can be done:
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
--8<-- "docs/getting-started/simple_text_prompts.py"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
It's also possible to use a single multi prompt:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
--8<-- "docs/getting-started/simple_multi_prompt.py"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+

|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from inquirer_textual import prompts
|
|
2
|
+
from inquirer_textual.widgets.InquirerText import InquirerText
|
|
3
|
+
|
|
4
|
+
if __name__ == "__main__":
|
|
5
|
+
answers = first_name = prompts.multi({
|
|
6
|
+
'first_name': InquirerText('First name:'),
|
|
7
|
+
'last_name': InquirerText('Last name:')
|
|
8
|
+
})
|
|
9
|
+
print(f'Hello, {answers["first_name"]} {answers["last_name"]}! 👋')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Output docs/getting-started/simple_multi_prompt.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run docs/getting-started/simple_multi_prompt.py"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type Charlie
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Enter
|
|
10
|
+
Sleep 2s
|
|
11
|
+
Type Brown
|
|
12
|
+
Sleep 1s
|
|
13
|
+
Enter
|
|
14
|
+
Sleep 3s
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Output docs/getting-started/simple_text_prompts.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run docs/getting-started/simple_text_prompts.py"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type Charlie
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Enter
|
|
10
|
+
Sleep 2s
|
|
11
|
+
Type Brown
|
|
12
|
+
Sleep 1s
|
|
13
|
+
Enter
|
|
14
|
+
Sleep 3s
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
</a>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Introduction
|
|
25
25
|
|
|
26
26
|
All terminal programs start small. Some stay small, and some become incredibly
|
|
27
27
|
big. The goal of this Python library is to make user input simple for small
|
|
28
|
-
programs,
|
|
28
|
+
programs, while enabling a smooth transition to a comprehensive UI library as
|
|
29
29
|
your program grows.
|
|
30
30
|
|
|
31
31
|
This library is based on the sophisticated
|
|
@@ -47,6 +47,15 @@ With `uv` you can run the example out of the box:
|
|
|
47
47
|
uv run --with inquirer-textual checkbox.py
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
Create and activate a virtual environment (for example with
|
|
53
|
+
[uv](https://docs.astral.sh/uv/)), and then install this package:
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
pip install inquirer-textual
|
|
57
|
+
```
|
|
58
|
+
|
|
50
59
|
## Key features and design principles
|
|
51
60
|
|
|
52
61
|
* **Keep simple things simple**: High-level prompts API for getting user input
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Output docs/themes/catppuccin_mocha.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/themes.py catppuccin-mocha"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type y
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Type "555-2368"
|
|
10
|
+
Enter
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Enter
|
|
13
|
+
Sleep 1s
|
|
14
|
+
Type "3"
|
|
15
|
+
Enter
|
|
16
|
+
Sleep 1s
|
|
17
|
+
Space
|
|
18
|
+
Down
|
|
19
|
+
Sleep 1s
|
|
20
|
+
Space
|
|
21
|
+
Sleep 1s
|
|
22
|
+
Enter
|
|
23
|
+
Sleep 1s
|
|
24
|
+
Enter
|
|
25
|
+
Sleep 1s
|
|
26
|
+
Enter
|
|
27
|
+
Sleep 3s
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Output docs/themes/nord.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/themes.py nord
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type y
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Type "555-2368"
|
|
10
|
+
Enter
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Enter
|
|
13
|
+
Sleep 1s
|
|
14
|
+
Type "3"
|
|
15
|
+
Enter
|
|
16
|
+
Sleep 1s
|
|
17
|
+
Space
|
|
18
|
+
Down
|
|
19
|
+
Sleep 1s
|
|
20
|
+
Space
|
|
21
|
+
Sleep 1s
|
|
22
|
+
Enter
|
|
23
|
+
Sleep 1s
|
|
24
|
+
Enter
|
|
25
|
+
Sleep 1s
|
|
26
|
+
Enter
|
|
27
|
+
Sleep 3s
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Output docs/themes/solarized_light.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/themes.py solarized-light"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type y
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Type "555-2368"
|
|
10
|
+
Enter
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Enter
|
|
13
|
+
Sleep 1s
|
|
14
|
+
Type "3"
|
|
15
|
+
Enter
|
|
16
|
+
Sleep 1s
|
|
17
|
+
Space
|
|
18
|
+
Down
|
|
19
|
+
Sleep 1s
|
|
20
|
+
Space
|
|
21
|
+
Sleep 1s
|
|
22
|
+
Enter
|
|
23
|
+
Sleep 1s
|
|
24
|
+
Enter
|
|
25
|
+
Sleep 1s
|
|
26
|
+
Enter
|
|
27
|
+
Sleep 3s
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Output docs/themes/textual_dark.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/themes.py textual-dark"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type y
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Type "555-2368"
|
|
10
|
+
Enter
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Enter
|
|
13
|
+
Sleep 1s
|
|
14
|
+
Type "3"
|
|
15
|
+
Enter
|
|
16
|
+
Sleep 1s
|
|
17
|
+
Space
|
|
18
|
+
Down
|
|
19
|
+
Sleep 1s
|
|
20
|
+
Space
|
|
21
|
+
Sleep 1s
|
|
22
|
+
Enter
|
|
23
|
+
Sleep 1s
|
|
24
|
+
Enter
|
|
25
|
+
Sleep 1s
|
|
26
|
+
Enter
|
|
27
|
+
Sleep 3s
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Output docs/themes/textual_light.gif
|
|
2
|
+
Set Shell zsh
|
|
3
|
+
Set Theme { "background": "#000000" }
|
|
4
|
+
Type "uv run examples/themes.py textual-light"
|
|
5
|
+
Enter
|
|
6
|
+
Sleep 2s
|
|
7
|
+
Type y
|
|
8
|
+
Sleep 1s
|
|
9
|
+
Type "555-2368"
|
|
10
|
+
Enter
|
|
11
|
+
Sleep 1s
|
|
12
|
+
Enter
|
|
13
|
+
Sleep 1s
|
|
14
|
+
Type "3"
|
|
15
|
+
Enter
|
|
16
|
+
Sleep 1s
|
|
17
|
+
Space
|
|
18
|
+
Down
|
|
19
|
+
Sleep 1s
|
|
20
|
+
Space
|
|
21
|
+
Sleep 1s
|
|
22
|
+
Enter
|
|
23
|
+
Sleep 1s
|
|
24
|
+
Enter
|
|
25
|
+
Sleep 1s
|
|
26
|
+
Enter
|
|
27
|
+
Sleep 3s
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env -S uv run --script
|
|
2
|
+
#
|
|
3
|
+
# https://inquirerpy.readthedocs.io/
|
|
4
|
+
|
|
5
|
+
# /// script
|
|
6
|
+
# dependencies = [
|
|
7
|
+
# "inquirerpy",
|
|
8
|
+
# ]
|
|
9
|
+
# ///
|
|
10
|
+
|
|
11
|
+
from InquirerPy import inquirer
|
|
12
|
+
from InquirerPy.validator import EmptyInputValidator
|
|
13
|
+
|
|
14
|
+
def confirm():
|
|
15
|
+
return inquirer.confirm(message='Do you want to save this entry?').execute()
|
|
16
|
+
|
|
17
|
+
def fuzzy():
|
|
18
|
+
return inquirer.fuzzy(
|
|
19
|
+
message="Select element:",
|
|
20
|
+
choices=["Hydrogen", "Helium", "Lithium", "Beryllium", "Boron",
|
|
21
|
+
"Carbon"],
|
|
22
|
+
default="Lithium",
|
|
23
|
+
).execute()
|
|
24
|
+
|
|
25
|
+
def number():
|
|
26
|
+
return inquirer.number(
|
|
27
|
+
message="Enter integer:",
|
|
28
|
+
min_allowed=-2,
|
|
29
|
+
max_allowed=10,
|
|
30
|
+
validate=EmptyInputValidator(),
|
|
31
|
+
).execute()
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
print(fuzzy())
|