Tornado is an open source Python web framework, scalable web server, and asynchronous networking library which has been in development from 2009.
By using non-blocking network I/O, Tornado specializes in handling thousands of simultaneous connections and real-time services. This makes it a good fit for long polling, WebSockets, and other applications that need a long-lived connection to each user.
The framework is designed to be simple, like web.py or Bottle, without some of the more complex configuration of web frameworks like Django. A Tornado web application generally consists of one or more ‘.RequestHandler’ subclasses, an ‘.Application’ object which routes incoming requests to handlers, and a ”main()” function to start the server.
Tornado has four main components:
- Web framework.
- Client- and server-side implementations of HTTP – a non-blocking, single-threaded TCP server.
- Asynchronous networking library including the classes IOLoop and IOStream, which serve as the building blocks for the HTTP components and can also be used to implement other protocols.
- IOLoop – an I/O event loop for non-blocking sockets. In addition to I/O events, IOLoop can also schedule time-based events.
- IOStream – provides utility classes to write to and read from non-blocking files and sockets.
- Coroutine library (tornado.gen) – allows asynchronous code to be written in a more straightforward way than chaining callbacks.
Features include:
- Good performance.
- To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all application code should aim to be asynchronous and non-blocking because only one operation can be active at a time.
- Supports non-blocking, asynchronous web / networking application development.
- Built-in multi-process mode to start several processes simultaneously.
- Native Websocket Support
- Support for social logins.
- Built in options/config file utilities.
- Simple, fast, and flexible templating language. Tornado can also be used with any other Python template language. Tornado templates are translated directly to Python.
- Routing.
- Supplied with many useful compact utilities that make writing Python code fun.
- Libraries based on asyncio can be mixed relatively seamlessly with those using Tornado.
- Cookie utilities.
- Request parsing.
- Supports Python 2.7.9+ and 3.4+.
- Offers an alternative to the Python Web Server Gateway.
Website: www.tornadoweb.org
Support: GitHub, Wiki, Mailing List (Announcement)
Developer: The Tornado Authors
License: Apache License 2.0
Tornado is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Python Application Servers | |
|---|---|
| Tornado | Web framework, web server, and asynchronous networking library |
| Gunicorn | Python WSGI HTTP Server |
| Phusion Passenger | Web server and application server for Ruby, Python and Node.js |
| uWSGI | Aims at developing a full stack for building hosting services |
| Twisted | Networking engine supporting numerous protocols such as a web server |
| Zope | Zope stands for "Z Object Publishing Environment" |
| CherryPy | Pythonic, object-oriented web framework |
Read our verdict in the software roundup.
| Python Frameworks | |
|---|---|
| Django | High-level web application framework |
| Dash | Build analytical web applications without JavaScript |
| Tornado | Framework, scalable web server, and asynchronous networking library |
| TurboGears | Framework based on the ObjectDispatch paradigm |
| Masonite | Dev tool with all the features needed for rapid development |
| Reflex | Library to build full-stack web apps in pure Python |
| Zope | Object-oriented web application server |
| CubicWeb | Semantic web framework |
| Reahl | Python-only web framework |
| django-hotsauce | Rapid web application development and testing |
| Jam.py | Web front-end application generator |
| Grok | Web framework based on Zope Toolkit technology |
| web2py | Full-featured, full-stack framework for rapid development |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

