swh.web package

Subpackages

Submodules

swh.web.config module

swh.web.config.get_config(config_file='web/web')[source]

Read the configuration file config_file.

If an environment variable SWH_CONFIG_FILENAME is defined, this takes precedence over the config_file parameter.

In any case, update the app with parameters (secret_key, conf) and return the parsed configuration as a dict.

If no configuration file is provided, return a default configuration.

swh.web.config.storage()[source]

Return the current application’s storage.

swh.web.config.vault()[source]

Return the current application’s vault.

swh.web.config.indexer_storage()[source]

Return the current application’s indexer storage.

swh.web.config.scheduler()[source]

Return the current application’s scheduler.

swh.web.doc_config module

class swh.web.doc_config.SimpleDocumenter(directive, name, indent='')[source]

Bases: sphinx.ext.autodoc.FunctionDocumenter

Custom autodoc directive to display a docstring unindented and without function signature header.

objtype = 'simple'
priority = -1
content_indent = ''
add_directive_header(sig)[source]

Add the directive header and options to the generated content.

__module__ = 'swh.web.doc_config'
swh.web.doc_config.setup(app)[source]
swh.web.doc_config.customize_sphinx_conf(sphinx_conf)[source]

Utility function used to customize the sphinx doc build for swh-web globally (when building doc from swh-docs) or locally (when building doc from swh-web).

Parameters:sphinx_conf (module) – a reference to the sphinx conf.py module used to build the doc.

swh.web.manage module

swh.web.urls module

swh.web.urls._default_view(request)[source]
swh.web.urls.insecure_serve(request, path, **kwargs)[source]

Module contents