.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
bool | setup (self, dict[str, t.Any] engine_settings) |
bool|None | init (self, dict[str, t.Any] engine_settings) |
"EngineResults" | search (self, str query, "OfflineParamTypes" params) |
None | request (self, str query, "OnlineParamTypes" params) |
"EngineResults" | response (self, "SXNG_Response" resp) |
Static Public Attributes | |
logging | logger .Logger |
int | max_page = 0 |
str | fetch_traits : "Callable[[EngineTraits, bool], None]" |
str | traits : "traits.EngineTraits" |
list | categories [str] |
dict | proxies [str, dict[str, str]] |
dict | about [str, dict[str, str]] |
list | tokens [str] |
Class of engine instances build from YAML settings. Further documentation see :ref:`general engine configuration`. .. hint:: This class is currently never initialized and only used for type hinting.
Definition at line 179 of file __init__.py.
bool | None searx.enginelib.Engine.init | ( | self, | |
dict[str, t.Any] | engine_settings ) |
Initialization of the engine. The method is optional and asynchronous (in a thread). It is suitable, for example, for setting up a cache (for the engine) or for querying values (required by the engine) from a remote. Whether the initialization was successful can be indicated by the return value ``True`` or even ``False``. - If no return value is given from this init method (``None``), this is equivalent to ``True``. - If an exception is thrown as part of the initialization, this is equivalent to ``False``.
Definition at line 328 of file __init__.py.
Referenced by searx.sqlitedb.SQLiteAppl.connect(), and searx.sqlitedb.SQLiteAppl.DB().
None searx.enginelib.Engine.request | ( | self, | |
str | query, | ||
"OnlineParamTypes" | params ) |
Method to build the parameters for the request of an ``online`` engine.
Definition at line 351 of file __init__.py.
"EngineResults" searx.enginelib.Engine.response | ( | self, | |
"SXNG_Response" | resp ) |
Method to parse the response of an ``online`` engine.
Definition at line 356 of file __init__.py.
"EngineResults" searx.enginelib.Engine.search | ( | self, | |
str | query, | ||
"OfflineParamTypes" | params ) |
Search method of the ``offline`` engines
Definition at line 347 of file __init__.py.
bool searx.enginelib.Engine.setup | ( | self, | |
dict[str, t.Any] | engine_settings ) |
Dynamic setup of the engine settings. With this method, the engine's setup is carried out. For example, to check or dynamically adapt the values handed over in the parameter ``engine_settings``. The return value (True/False) indicates whether the setup was successful and the engine can be built or rejected. The method is optional and is called synchronously as part of the initialization of the service and is therefore only suitable for simple (local) exams/changes at the engine setting. The :py:obj:`Engine.init` method must be used for longer tasks in which values of a remote must be determined, for example.
Definition at line 312 of file __init__.py.
|
static |
Definition at line 283 of file __init__.py.
|
static |
Definition at line 242 of file __init__.py.
|
static |
Definition at line 234 of file __init__.py.
|
static |
Definition at line 189 of file __init__.py.
Referenced by searx.search.processors.online.OnlineProcessor.get_params(), searx.search.processors.offline.OfflineProcessor.search(), and searx.search.processors.online.OnlineProcessor.search().
|
static |
Definition at line 199 of file __init__.py.
|
static |
Definition at line 266 of file __init__.py.
Referenced by searx.network.network.Network.check_parameters(), and searx.network.network.Network.iter_proxies().
|
static |
|
static |
Definition at line 237 of file __init__.py.