interface documentation

class IRequestLifecycle(Interface): (source)

Known implementations: klein._requirer.RequestLifecycle

View In Hierarchy

Interface for adding hooks to the phases of a request's lifecycle.

Method addPrepareHook Add a hook that promises to prepare the request by supplying the given interfaces as components on the request, and requires the given requirements.
def addPrepareHook(beforeHook, requires=(), provides=()): (source)

Add a hook that promises to prepare the request by supplying the given interfaces as components on the request, and requires the given requirements.

Prepare hooks are run before any IDependencyInjectors inject their values.

Parameters
beforeHook:CallableUndocumented
requires:Sequence[Type[Interface]]Undocumented
provides:Sequence[Type[Interface]]Undocumented