.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self) | |
load_builtins (self) | |
register_by_fqn (self, str fqn) | |
register (self, Answerer answerer) | |
list[BaseAnswer] | ask (self, str query) |
list[AnswererInfo] | info (self) |
Static Public Attributes | |
set | answerer_list [Answerer] |
A storage for managing the *answerers* of SearXNG. With the :py:obj:`AnswerStorage.ask`” method, a caller can ask questions to all *answerers* and receives a list of the results.
searx.answerers._core.AnswerStorage.__init__ | ( | self | ) |
Definition at line 96 of file _core.py.
References __init__(), and answerer_list.
Referenced by __init__().
list[BaseAnswer] searx.answerers._core.AnswerStorage.ask | ( | self, | |
str | query ) |
An answerer is identified via keywords, if there is a keyword at the first position in the ``query`` for which there is one or more answerers, then these are called, whereby the entire ``query`` is passed as argument to the answerer function.
Definition at line 144 of file _core.py.
list[AnswererInfo] searx.answerers._core.AnswerStorage.info | ( | self | ) |
Definition at line 168 of file _core.py.
References answerer_list.
searx.answerers._core.AnswerStorage.load_builtins | ( | self | ) |
Loads ``answerer.py`` modules from the python packages in :origin:`searx/answerers`. The python modules are wrapped by :py:obj:`ModuleAnswerer`.
Definition at line 100 of file _core.py.
References register(), and register_by_fqn().
searx.answerers._core.AnswerStorage.register | ( | self, | |
Answerer | answerer ) |
Register a :py:obj:`Answerer`.
Definition at line 136 of file _core.py.
References answerer_list, searx.botdetection.config.Config.get(), searx.metrics.models.CounterStorage.get(), searx.metrics.models.HistogramStorage.get(), and searx.network.Request.get().
Referenced by load_builtins(), searx.plugins._core.PluginStorage.load_builtins(), register_by_fqn(), and searx.plugins._core.PluginStorage.register_by_fqn().
searx.answerers._core.AnswerStorage.register_by_fqn | ( | self, | |
str | fqn ) |
Register a :py:obj:`Answerer` via its fully qualified class namen(FQN).
Definition at line 122 of file _core.py.
References register().
Referenced by load_builtins(), and searx.plugins._core.PluginStorage.load_builtins().
|
static |
Definition at line 93 of file _core.py.
Referenced by __init__(), info(), and register().