Key-Value Results

Back to top

Typification of the keyvalue results. Results of this type are rendered in the template.


class searx.result_types.keyvalue.KeyValue(title: str = '', content: str = '', img_src: str = '', iframe_src: str = '', audio_src: str = '', thumbnail: str = '', publishedDate: ~datetime.datetime | None = None, pubdate: str = '', length: ~datetime.timedelta | None = None, views: str = '', author: str = '', metadata: str = '', priority: ~typing.Literal['', 'high', 'low'] = '', engines: set[str] = <factory>, open_group: bool = False, close_group: bool = False, positions: list[int] = <factory>, score: float = 0, category: str = '', *, template: str = 'keyvalue.html', url: str | None = None, engine: str | None = '', parsed_url: ~urllib.parse.ParseResult | None = None, kvmap: dict[str, ~typing.Any] | ~collections.OrderedDict[str, ~typing.Any], caption: str = '', key_title: str = '', value_title: str = '')[source] : Bases: MainResult

Simple table view which maps *key* names (first col) to *values*
(second col).

kvmap: [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [OrderedDict](https://docs.python.org/3/library/collections.html#collections.OrderedDict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)]
:   Dictionary with keys and values. To sort keys, use `OrderedDict`.

caption: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
:   Optional caption for this result.

key\_title: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
:   Optional title for the *key column*.

value\_title: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
:   Optional title for the *value column*.

Copyright © SearXNG team

Made with Furo

💾 🌐