def load(self): # load the app return util.import_app(self.app_uri)
def __call__(self, event, context): request = Request() response = Response() api = util.import_app(event['_app_module']) getattr(api.routes[event['_resource_path']], HTTP_METHODS[event['_http_method']])(request, response) return response.body # TODO: reformat to JSON for HTTP Headers