The panko.api.hooks Module

class panko.api.hooks.ConfigHook(conf)

Bases: pecan.hooks.PecanHook

Attach the configuration object to the request.

That allows controllers to get it.

before(state)

Override this method to create a hook that gets called after routing, but before the request gets passed to your controller.

Parameters

state – The Pecan state object for the current request.

class panko.api.hooks.DBHook(conf)

Bases: pecan.hooks.PecanHook

before(state)

Override this method to create a hook that gets called after routing, but before the request gets passed to your controller.

Parameters

state – The Pecan state object for the current request.

class panko.api.hooks.TranslationHook

Bases: pecan.hooks.PecanHook

after(state)

Override this method to create a hook that gets called after the request has been handled by the controller.

Parameters

state – The Pecan state object for the current request.