Skip to content

Instantly share code, notes, and snippets.

@avelino
Created October 15, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avelino/154a2d612b4ff732558e81113762abde to your computer and use it in GitHub Desktop.
Save avelino/154a2d612b4ff732558e81113762abde to your computer and use it in GitHub Desktop.
# https://avelino.xxx/go-vs-python-more-request-per-second/
import falcon
class ThingsResource:
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
resp.body = ("Hello World")
app = falcon.API()
things = ThingsResource()
app.add_route('/', things)
if __name__ == '__main__':
from gevent.wsgi import WSGIServer
http_server = WSGIServer(('', 8080), app, log=None)
http_server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment