.oO SearXNG Developer Documentation Oo.
|
Classes | |
class | ExtendedRequest |
Functions | |
get_locale () | |
_get_browser_language (req, lang_list) | |
_get_locale_rfc5646 (locale) | |
code_highlighter (codelines, language=None) | |
get_result_template (str theme_name, str template_name) | |
custom_url_for (str endpoint, **values) | |
morty_proxify (str url) | |
image_proxify (str url) | |
get_translations () | |
get_enabled_categories (Iterable[str] category_names) | |
get_pretty_url (urllib.parse.ParseResult parsed_url) | |
get_client_settings () | |
render (str template_name, **kwargs) | |
pre_request () | |
add_default_headers (flask.Response response) | |
post_request (flask.Response response) | |
index_error (str output_format, str error_message) | |
index () | |
health () | |
client_token (token=None) | |
search () | |
about () | |
info (pagename, locale) | |
autocompleter () | |
preferences () | |
image_proxy () | |
engine_descriptions () | |
stats () | |
stats_errors () | |
stats_checker () | |
robots () | |
opensearch () | |
favicon () | |
clear_cookies () | |
config () | |
page_not_found (_e) | |
run () | |
Variables | |
logger = logger.getChild('webapp') | |
static_files = get_static_files(settings['ui']['static_path']) | |
default_theme = settings['ui']['default_theme'] | |
templates_path = settings['ui']['templates_path'] | |
themes = get_themes(templates_path) | |
result_templates = get_result_templates(templates_path) | |
dict | STATS_SORT_PARAMETERS |
app = Flask(__name__, static_folder=settings['ui']['static_path'], template_folder=templates_path) | |
trim_blocks | |
lstrip_blocks | |
secret_key | |
request = typing.cast(ExtendedRequest, flask.request) | |
babel = Babel(app, locale_selector=get_locale) | |
methods | |
endpoint | |
view_func | |
tuple | flask_run_development |
tuple | werkzeug_reloader = flask_run_development or (searx_debug and __name__ == "__main__") |
enable_checker | |
True | |
check_network | |
enable_metrics | |
application = app | |
WebbApp
|
protected |
Definition at line 194 of file webapp.py.
Referenced by searx.webapp.pre_request().
|
protected |
Get locale name for <html lang="..."> Chrom* browsers don't detect the language when there is a subtag (ie a territory). For example "zh-TW" is detected but not "zh-Hant-TW". This function returns a locale without the subtag.
Definition at line 200 of file webapp.py.
Referenced by searx.webapp.render().
searx.webapp.about | ( | ) |
Redirect to about page
Definition at line 809 of file webapp.py.
References searx.webapp.custom_url_for().
searx.webapp.add_default_headers | ( | flask.Response | response | ) |
Definition at line 537 of file webapp.py.
searx.webapp.autocompleter | ( | ) |
Return autocompleter results
Definition at line 832 of file webapp.py.
searx.webapp.clear_cookies | ( | ) |
searx.webapp.client_token | ( | token = None | ) |
searx.webapp.code_highlighter | ( | codelines, | |
language = None ) |
Definition at line 212 of file webapp.py.
searx.webapp.config | ( | ) |
Return configuration in JSON format.
Definition at line 1271 of file webapp.py.
searx.webapp.custom_url_for | ( | str | endpoint, |
** | values ) |
Definition at line 266 of file webapp.py.
References searx.format.
Referenced by searx.webapp.about(), searx.webapp.get_client_settings(), and searx.webapp.render().
searx.webapp.engine_descriptions | ( | ) |
Definition at line 1118 of file webapp.py.
searx.webapp.favicon | ( | ) |
Definition at line 1253 of file webapp.py.
searx.webapp.get_client_settings | ( | ) |
Definition at line 358 of file webapp.py.
References searx.webapp.custom_url_for(), and searx.webapp.get_translations().
Referenced by searx.webapp.render().
searx.webapp.get_enabled_categories | ( | Iterable[str] | category_names | ) |
The categories in ``category_names```for which there is no active engine are filtered out and a reduced list is returned.
Definition at line 340 of file webapp.py.
Referenced by searx.webapp.render().
searx.webapp.get_locale | ( | ) |
searx.webapp.get_pretty_url | ( | urllib.parse.ParseResult | parsed_url | ) |
Definition at line 351 of file webapp.py.
searx.webapp.get_result_template | ( | str | theme_name, |
str | template_name ) |
searx.webapp.get_translations | ( | ) |
Definition at line 329 of file webapp.py.
Referenced by searx.webapp.get_client_settings().
searx.webapp.health | ( | ) |
searx.webapp.image_proxify | ( | str | url | ) |
Definition at line 302 of file webapp.py.
References searx.format, and searx.webapp.morty_proxify().
searx.webapp.image_proxy | ( | ) |
Definition at line 1045 of file webapp.py.
searx.webapp.index | ( | ) |
Render index page.
Definition at line 598 of file webapp.py.
References searx.webapp.render().
searx.webapp.index_error | ( | str | output_format, |
str | error_message ) |
Definition at line 568 of file webapp.py.
References searx.webapp.render().
Referenced by searx.webapp.search().
searx.webapp.info | ( | pagename, | |
locale ) |
Render page of online user documentation
Definition at line 816 of file webapp.py.
References searx.webapp.render().
searx.webapp.morty_proxify | ( | str | url | ) |
Definition at line 287 of file webapp.py.
References searx.format.
Referenced by searx.webapp.image_proxify().
searx.webapp.opensearch | ( | ) |
Definition at line 1236 of file webapp.py.
References searx.webapp.render().
searx.webapp.page_not_found | ( | _e | ) |
Definition at line 1333 of file webapp.py.
References searx.webapp.render().
searx.webapp.post_request | ( | flask.Response | response | ) |
Definition at line 547 of file webapp.py.
searx.webapp.pre_request | ( | ) |
Definition at line 475 of file webapp.py.
References searx.webapp._get_browser_language().
searx.webapp.preferences | ( | ) |
Render preferences page && save user preferences
Definition at line 881 of file webapp.py.
References searx.webapp.render().
searx.webapp.render | ( | str | template_name, |
** | kwargs ) |
Definition at line 372 of file webapp.py.
References searx.webapp._get_locale_rfc5646(), searx.webapp.custom_url_for(), searx.format, searx.webapp.get_client_settings(), and searx.webapp.get_enabled_categories().
Referenced by searx.webapp.index(), searx.webapp.index_error(), searx.webapp.info(), searx.webapp.opensearch(), searx.webapp.page_not_found(), searx.webapp.preferences(), searx.webapp.search(), and searx.webapp.stats().
searx.webapp.robots | ( | ) |
Definition at line 1222 of file webapp.py.
searx.webapp.run | ( | ) |
Definition at line 1358 of file webapp.py.
searx.webapp.search | ( | ) |
Search query in q and return results. Supported outputs: html, json, csv, rss.
Definition at line 627 of file webapp.py.
References searx.format, searx.webapp.index_error(), and searx.webapp.render().
searx.webapp.stats | ( | ) |
Render engine statistics page.
Definition at line 1142 of file webapp.py.
References searx.webapp.render().
searx.webapp.stats_checker | ( | ) |
searx.webapp.stats_errors | ( | ) |
Definition at line 1209 of file webapp.py.
searx.webapp.app = Flask(__name__, static_folder=settings['ui']['static_path'], template_folder=templates_path) |
searx.webapp.babel = Babel(app, locale_selector=get_locale) |
searx.webapp.default_theme = settings['ui']['default_theme'] |
tuple searx.webapp.flask_run_development |
searx.webapp.request = typing.cast(ExtendedRequest, flask.request) |
searx.webapp.result_templates = get_result_templates(templates_path) |
searx.webapp.static_files = get_static_files(settings['ui']['static_path']) |
dict searx.webapp.STATS_SORT_PARAMETERS |
searx.webapp.templates_path = settings['ui']['templates_path'] |
searx.webapp.themes = get_themes(templates_path) |
tuple searx.webapp.werkzeug_reloader = flask_run_development or (searx_debug and __name__ == "__main__") |