def djangae_webapp(request_handler):

    def request_handler_wrapper(request, *args, **kwargs):
        from webapp2 import Request, Response, WSGIApplication
        from django.http import HttpResponse

        class Route:
            handler_method = request.method.lower()

        req = Request(request.environ)
        req.route = Route()
        req.route_args = args
        req.route_kwargs = kwargs
        req.app = WSGIApplication()
        response = Response()
        view_func = request_handler(req, response)
        view_func.dispatch()

        django_response = HttpResponse(response.body, status=int(str(response.status).split(" ")[0]))
        for header, value in response.headers.iteritems():
            django_response[header] = value

        return django_response

    return request_handler_wrapper
:type loop: Loop
dataset/ETHPy150Open potatolondon/djangae/djangae/utils.py/djangae_webapp--crossover with--dataset/ETHPy150Open veegee/guv/pyuv_cffi/__init__.py/Timer.__init__