Public Member Functions | Public Attributes
tornado.wsgi.WSGIAdapter Class Reference

List of all members.

Public Member Functions

def __call__
def __init__

Public Attributes

 application

Detailed Description

Converts a `tornado.web.Application` instance into a WSGI application.

Example usage::

    import tornado.web
    import tornado.wsgi
    import wsgiref.simple_server

    class MainHandler(tornado.web.RequestHandler):
        def get(self):
            self.write("Hello, world")

    if __name__ == "__main__":
        application = tornado.web.Application([
            (r"/", MainHandler),
        ])
        wsgi_app = tornado.wsgi.WSGIAdapter(application)
        server = wsgiref.simple_server.make_server('', 8888, wsgi_app)
        server.serve_forever()

See the `appengine demo
<https://github.com/tornadoweb/tornado/tree/stable/demos/appengine>`_
for an example of using this module to run a Tornado app on Google
App Engine.

In WSGI mode asynchronous methods are not supported.  This means
that it is not possible to use `.AsyncHTTPClient`, or the
`tornado.auth` or `tornado.websocket` modules.

.. versionadded:: 4.0

Definition at line 156 of file wsgi.py.


Constructor & Destructor Documentation

def tornado.wsgi.WSGIAdapter.__init__ (   self,
  application 
)

Definition at line 188 of file wsgi.py.


Member Function Documentation

def tornado.wsgi.WSGIAdapter.__call__ (   self,
  environ,
  start_response 
)

Definition at line 195 of file wsgi.py.


Member Data Documentation

Definition at line 188 of file wsgi.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:21