script_filter¶
- class afwf.script_filter.ScriptFilter(*, items: list[~afwf.item.Item] = <factory>, variables: dict | None = None, rerun: float | None = 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:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].