script_filter#
- class afwf.script_filter.ScriptFilter(items: List[Optional[Union[Dict[str, Any], AttrsClass]]] = _Nothing.NOTHING, variables: Optional[dict] = None, rerun: Optional[float] = None)[source]#
The script filter return object that flush out to standard out.
- Parameters:
items – list of items object that for drop down menu
variables – session level variables. items also has item level variables, this feature won’t be used for 99% of the time
rerun – 0.1 ~ 5.0 if available, the script will only be re-run if the script filter is still active and the user hasn’t changed the state of the filter by typing and triggering a re-run.
Usage example:
>>> import afwf.api as afwf >>> sf = afwf.ScriptFilter() >>> sf.items.append(afwf.Item(title="my title")) >>> sf.send_feedback()
Ref:
- to_script_filter() dict [source]#
Convert
ScriptFilter
object to dict representation of the JSON. You can use this method to debug the JSON output.