Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
end
{0}
end
""".format(source))
except Exception, e:
raise e
#return "Bad source", 400
globals = _export_globals()
globals['request'] = adapt_request(request)
globals['require'] = lua.eval("""
function(name)
return loadstring(http.load(name))()
end""")
return adapt_response(
app(lupa.as_attrgetter(globals)))
def make_table(dict):
return lua.eval("""
function(d)
local t = {}
for key, value in python.iterex(d.items()) do
t[key] = value
end
return t
end
""")(lupa.as_attrgetter(dict))