Permalink
Browse files

Added eventlet support. Thanks to apgwoz for the patch!

  • Loading branch information...
1 parent e01fad8 commit 1a4460c4b917069a8f2be7f4a723f565448adc22 @toastdriven committed Jun 25, 2011
Showing with 8 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +1 −0 examples/alternate_servers.py
  3. +6 −0 itty.py
View
1 AUTHORS
@@ -16,3 +16,4 @@ Contributors:
* Matt G (binarydud) for the Gunicorn adapter.
* DrMegahertz for updating the Gunicorn adapter to 0.9.
* thejustinwalsh for a patch related to serving binary files.
+ * apgwoz for the Eventlet adapter & a query patch.
View
1 examples/alternate_servers.py
@@ -17,3 +17,4 @@ def index(request):
# run_itty(server='paste')
# run_itty(server='gunicorn')
# run_itty(server='gevent')
+# run_itty(server='eventlet')
View
6 itty.py
@@ -574,6 +574,11 @@ def gevent_adapter(host, port):
wsgi.WSGIServer((host, int(port)), handle_request).serve_forever()
+def eventlet_adapter(host, port):
+ from eventlet import wsgi, listen
+ wsgi.server(listen((host, int(port))), handle_request)
+
+
WSGI_ADAPTERS = {
'wsgiref': wsgiref_adapter,
'appengine': appengine_adapter,
@@ -585,6 +590,7 @@ def gevent_adapter(host, port):
'tornado': tornado_adapter,
'gunicorn': gunicorn_adapter,
'gevent': gevent_adapter,
+ 'eventlet': eventlet_adapter,
}

0 comments on commit 1a4460c

Please sign in to comment.