|
.oO SearXNG Developer Documentation Oo.
|
Classes | |
| class | Item |
Public Member Functions | |
| __post_init__ (self) | |
| Public Member Functions inherited from searx.result_types._base.Result | |
| normalize_result_fields (self) | |
| __post_init__ (self) | |
| filter_urls (self, "Callable[[Result | LegacyResult, str, str], str | bool]" filter_func) | |
| int | __hash__ (self) |
| __eq__ (self, object other) | |
| __setitem__ (self, str field_name, t.Any value) | |
| t.Any | __getitem__ (self, str field_name) |
| __iter__ (self) | |
| as_dict (self) | |
| defaults_from (self, "Result" other) | |
Static Public Attributes | |
| str | translations : "list[Translations.Item]" |
| Static Public Attributes inherited from searx.result_types._base.Result | |
| str | url = None |
| str | template = "default.html" |
| str | engine = "" |
| urllib | parsed_url = None |
Answer type with a list of translations.
The items in the list of :py:obj:`Translations.translations` are of type
:py:obj:`Translations.Item`:
.. code:: python
def response(resp):
results = []
...
foo_1 = Translations.Item(
text="foobar",
synonyms=["bar", "foo"],
examples=["foo and bar are placeholders"],
)
foo_url="https://www.deepl.com/de/translator#en/de/foo"
...
Translations(results=results, translations=[foo], url=foo_url)
| searx.result_types.answer.Translations.__post_init__ | ( | self | ) |
Definition at line 124 of file answer.py.
References translations.
|
static |
Definition at line 121 of file answer.py.
Referenced by __post_init__().