App

class keg.app.Keg(import_name=None, *args, **kwargs)[source]
cli_loader_class

alias of keg.cli.CLILoader

config_class

alias of keg.config.Config

logger

Standard logger for the app.

make_config(instance_relative=False)[source]

Needed for Flask <= 0.10.x so we can set the configuration class being used. Once 0.11 comes out, Flask supports setting the config_class on the app.

on_config_complete()[source]

For subclasses to override

on_init_complete()[source]

For subclasses to override

request_context(environ)[source]

Request context for the app.

route(rule, **options)[source]

Enable .route() to be used in a class context as well. E.g.:

KegApp.route('/something'):
def view_something():
    pass
classmethod testing_prep(**config)[source]

Make sure an instance of this class exists in a state that is ready for testing to commence.

Trigger signal.testing_run_start the first time this method is called for an app.