repoze.bfg.events

class NewRequest(request)
An instance of this class is emitted as an event whenever repoze.bfg begins to process a new request. The instance has an attribute, request, which is a request object. This class implements the repoze.bfg.interfaces.INewRequest interface.
class NewResponse(response)

An instance of this class is emitted as an event whenever any repoze.bfg view returns a response. The instance has an attribute, response, which is the response object returned by the view. This class implements the repoze.bfg.interfaces.INewResponse interface.

Note

Postprocessing a response is usually better handled in a WSGI middleware component than in subscriber code that is called by a repoze.bfg.interfaces.INewResponse event. The repoze.bfg.interfaces.INewResponse event exists almost purely for symmetry with the repoze.bfg.interfaces.INewRequest event.

class WSGIApplicationCreatedEvent(app)
An instance of this class is emitted as an event when the repoze.bfg.configuration.Configurator.make_wsgi_app() is called. The instance has an attribute, app, which is an instance of the router that will handle WSGI requests. This class implements the repoze.bfg.interfaces.IWSGIApplicationCreatedEvent interface.

See Using Events for more information about how to register code which subscribes to these events.

Previous topic

repoze.bfg.configuration

Next topic

repoze.bfg.exceptions

This Page