MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / put_actions

Function put_actions

pywebio/pin.py:224–239  ·  view source on GitHub ↗

Output a group of action button. Refer to: `pywebio.input.actions()` Unlike the ``actions()``, ``put_actions()`` won't submit any form, it will only set the value of the pin widget. Only 'submit' type button is available in pin widget version. .. versionadded:: 1.4

(name: str, *, label: str = '', buttons: List[Union[Dict[str, Any], Tuple, List, str]] = None,
                help_text: str = None, scope: str = None, position: int = OutputPosition.BOTTOM)

Source from the content-addressed store, hash-verified

222
223
224def put_actions(name: str, *, label: str = '', buttons: List[Union[Dict[str, Any], Tuple, List, str]] = None,
225 help_text: str = None, scope: str = None, position: int = OutputPosition.BOTTOM) -> Output:
226 """Output a group of action button. Refer to: `pywebio.input.actions()`
227
228 Unlike the ``actions()``, ``put_actions()`` won't submit any form, it will only set the value of the pin widget.
229 Only 'submit' type button is available in pin widget version.
230
231 .. versionadded:: 1.4
232 """
233 from pywebio.input import actions
234 check_dom_name_value(name, 'pin `name`')
235 single_input_return = actions(name=name, label=label, buttons=buttons, help_text=help_text)
236 input_kwargs = single_input_kwargs(single_input_return)
237 for btn in input_kwargs['item_spec']['buttons']:
238 assert btn['type'] == 'submit', "The `put_actions()` pin widget only accept 'submit' type button."
239 return _pin_output(input_kwargs, scope, position)
240
241
242def put_file_upload(name: str, *, label: str = '', accept: Union[List, str] = None, placeholder: str = 'Choose file',

Callers 2

targetFunction · 0.85
pin_widgetsFunction · 0.85

Calls 4

actionsFunction · 0.90
check_dom_name_valueFunction · 0.85
single_input_kwargsFunction · 0.85
_pin_outputFunction · 0.85

Tested by 1

targetFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…