.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.plugins.PluginStore Class Reference

Public Member Functions

 __init__ (self)
 
 __iter__ (self)
 
 register (self, plugin)
 
 call (self, ordered_plugin_list, plugin_type, *args, **kwargs)
 

Public Attributes

list plugins = []
 

Detailed Description

Definition at line 188 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

searx.plugins.PluginStore.__init__ ( self)

Definition at line 189 of file __init__.py.

189 def __init__(self):
190 self.plugins: List[Plugin] = []
191

Member Function Documentation

◆ __iter__()

searx.plugins.PluginStore.__iter__ ( self)

Definition at line 192 of file __init__.py.

192 def __iter__(self):
193 yield from self.plugins
194

References searx.plugins.PluginStore.plugins, and searx.preferences.Preferences.plugins.

◆ call()

searx.plugins.PluginStore.call ( self,
ordered_plugin_list,
plugin_type,
* args,
** kwargs )

Definition at line 198 of file __init__.py.

198 def call(self, ordered_plugin_list, plugin_type, *args, **kwargs):
199 ret = True
200 for plugin in ordered_plugin_list:
201 if hasattr(plugin, plugin_type):
202 try:
203 ret = getattr(plugin, plugin_type)(*args, **kwargs)
204 if not ret:
205 break
206 except Exception: # pylint: disable=broad-except
207 plugin.logger.exception("Exception while calling %s", plugin_type)
208 return ret
209
210

◆ register()

searx.plugins.PluginStore.register ( self,
plugin )

Definition at line 195 of file __init__.py.

195 def register(self, plugin):
196 self.plugins.append(plugin)
197

References searx.plugins.PluginStore.plugins, and searx.preferences.Preferences.plugins.

Member Data Documentation

◆ plugins


The documentation for this class was generated from the following file: