Use Klein for the server and want to run it via Gunicorn.
from klein import Klein
app = Klein()
@app.route('/')
def hello(request):
return "Hello, world!"
resource = app.resource
Working good in twistd -n web --class=twistdPlugin.resource
but need add threads, how to do it?
Or how to start this with Gunicorn, now it's return me Application object must be callable.