File: types.rst

package info (click to toggle)
python-questionary 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 960 kB
  • sloc: python: 3,917; makefile: 66
file content (96 lines) | stat: -rw-r--r-- 1,878 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.. _question_types:

**************
Question Types
**************

The different question types are meant to cover different use cases. The
parameters and configuration options are explained in detail for each
type. But before we get into to many details, here is a **cheatsheet
with the available question types**:

* use :ref:`type_text` to ask for **free text** input

* use :ref:`type_password` to ask for free text where the **text is hidden**

* use :ref:`type_path` to ask for a **file or directory** path with autocompletion

* use :ref:`type_confirm` to ask a **yes or no** question

* use :ref:`type_select` to ask the user to select **one item** from a beautiful list

* use :ref:`type_raw_select` to ask the user to select **one item** from a list

* use :ref:`type_checkbox` to ask the user to select **any number of items** from a list

* use :ref:`type_autocomplete` to ask for free text with **autocomplete help**

* use :ref:`type_press_any_key_to_continue` to ask the user to **press any key to continue**

.. _type_text:

Text
####

.. automethod:: questionary::text

.. _type_password:

Password
########

.. automethod:: questionary::password

.. _type_path:

File Path
#########

.. automethod:: questionary::path

.. _type_confirm:

Confirmation
############

.. automethod:: questionary::confirm

.. _type_select:

Select
######

.. automethod:: questionary::select

.. _type_raw_select:

Raw Select
##########

.. automethod:: questionary::rawselect

.. _type_checkbox:

Checkbox
########

.. automethod:: questionary::checkbox

.. _type_autocomplete:

Autocomplete
############

.. automethod:: questionary::autocomplete

Printing Formatted Text
#######################

.. automethod:: questionary::print

.. _type_press_any_key_to_continue:

Press Any Key To Continue
#########################

.. automethod:: questionary::press_any_key_to_continue