websauna.utils.config.loader module

Support for INI file inclusion mechanism.

class websauna.utils.config.loader.ConfigLoader(filename)[source]

Bases: paste.deploy.loadwsgi.ConfigLoader

Configuration Loader.

class websauna.utils.config.loader.Loader(uri)[source]

Bases: plaster_pastedeploy.Loader

Loader returning a WSGI application.

get_wsgi_app(name=None, defaults=None)[source]

Reads the configuration source and finds and loads a WSGI application defined by the entry with name name per the PasteDeploy configuration format and loading mechanism.

Parameters
  • name – The named WSGI app to find, load and return. Defaults to None which becomes main inside paste.deploy.loadapp().

  • defaults – The global_conf that will be used during app instantiation.

Returns

A WSGI application.

get_wsgi_filter(name=None, defaults=None)[source]

Reads the configuration soruce and finds and loads a WSGI filter defined by the filter entry with the name name per the PasteDeploy configuration format and loading mechanism.

Parameters
  • name – The named WSGI filter to find, load and return. Defaults to None which becomes main inside paste.deploy.loadfilter().

  • defaults – The global_conf that will be used during filter instantiation.

Returns

A callable that can filter a WSGI application.

get_wsgi_server(name=None, defaults=None)[source]

Reads the configuration source and finds and loads a WSGI server defined by the server entry with the name name per the PasteDeploy configuration format and loading mechanism.

Parameters
  • name – The named WSGI server to find, load and return. Defaults to None which becomes main inside paste.deploy.loadserver().

  • defaults – The global_conf that will be used during server instantiation.

Returns

A WSGI server runner callable which accepts a WSGI app.

setup_logging(defaults=None, disable_existing_loggers=False)[source]

Set up logging via logging.config.fileConfig().

Defaults are specified for the special __file__ and here variables, similar to PasteDeploy config loading. Extra defaults can optionally be specified as a dict in defaults.

Parameters