Tornado Web Server — Tornado 4.4.3 documentation

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user. Upgrade notes As of Tornado 3.2, the backports.ssl_match_hostname package must be installed when running Tornado on Python 2. Hello, world Here is a simple “Hello, world” example web app for Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start() This example does not use any of Tornado’s asynchronous features; for that see this simple chat room. Installation Automatic installation: Manual installation: Download tornado-3.3.dev1.tar.gz:
Spawning
Spawning is a fast, easy to use, and flexible HTTP server for hosting python web applications which conform to the WSGI interface. Spawning uses eventlet to do non-blocking I/O for http requests and responses. This means the server will scale to a large number of idle keep-alive connections easily. Spawning can be configured to use multiple OS processes and either POSIX threads or eventlet’s green threads, which are implemented using greenlet. Spawning is open source software, licensed under the MIT license. If you wish to contribute to development, please check out the source from and either submit patches or fork spawning and submit a pull request. Single or Multiple Process If your wsgi applications store state in memory, Spawning can be configured to run only one Python process. Single or Multiple Worker Thread Graceful Code Reloading Running spawning Examples of running spawning % spawning my_wsgi_module.my_wsgi_application Run the Django app mysite:
Twisted includes a very scalable web server written...
waitress
Project description Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones which live in the Python standard library. For more information, see the “docs” directory of the Waitress package or . Features Waitress now has a __main__ and thus may be called with python -mwaitress Python 3.6 is now officially supported in Waitress Bugfixes Add a work-around for libc issue on Linux not following the documented standards. Bugfixes IPv6 support on Windows was broken due to missing constants in the socket module. Removed AI_ADDRCONFIG from the call to getaddrinfo, this resolves an issue whereby getaddrinfo wouldn’t return any addresses to bind to on hosts where there is no internet connection but localhost is requested to be bound to. Deprecations Python 2.6 is no longer supported. Download files Download the file for your platform.
Gunicorn - Python WSGI HTTP Server for UNIX
chaussette
Project description Chaussette is a WSGI server. The particularity of Chaussette is that it can either bind a socket on a port like any other server does or run against already opened sockets. That makes Chaussette the best companion to run a WSGI or Django stack under a process and socket manager, such as Circus. Quick Start Running: chaussette starts a very simple HTTP sample server on port 8080. Starting a WSGI application using chaussette is simply a matter of calling: chaussette examples.tornadoapp.wsgiapp Chaussette can also serve tornado (non WSGI) application: chaussette --backend tornado examples.tornadoapp.tornadoapp The simple_chat example can be started as: chaussette --backend socketio examples.simple_chat.chat.app Note that the two previous examples are not backend agnostic, since they are not (pure) WSGI applications. A flask based pure WSGI application can be started with most backends: chaussette --backend gevent examples.flaskapp.app Changelog Download files
Related:
Related: