Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Python Tutorial
  • Interview Questions
  • Python Quiz
  • Python Glossary
  • Python Projects
  • Practice Python
  • Data Science With Python
  • Python Web Dev
  • DSA with Python
  • Python OOPs
Open In App
Next Article:
Introduction to Tornado Framework
Next article icon

Introduction to Tornado Framework

Last Updated : 28 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Tornado is a robust Python asynchronous networking library and web framework, is available as an open-source project. Given that it is made to manage non-blocking, asynchronous processes, it is appropriate for developing high-performance, scalable web apps. Since its creation, Tornado—which was first created by FriendFeed—has been well-known for its ease of use, quickness, and ability to handle stable network connections.

Prerequisites

  • Download and Install Python 3 Latest Version

Key features of Tornado:

  • Asynchronous I/O: Tornado is well-suited for applications requiring high concurrency since it is designed to manage thousands of simultaneous connections in an efficient manner.
  • WebSockets: Tornado supports WebSockets, which allows clients and servers to communicate in real time.
  • Request Handlers: To handle incoming HTTP requests, Tornado employs the request-handler pattern. Classes called handlers specify how to reply to various kinds of requests.
  • Built-in Authentication and Authorization: Tornado comes with built-in ways to manage user authentication and authorization, which simplify the process of securing your apps.
  • Scalability: Tornado is well-suited for developing scalable web applications due to its capacity to manage several connections at once.

Lets create a basic tonado project:

Step 1 : Make sure Python is set up on the machine or From the Python website, we can get the most recent version. To check python installed or not run this command

>> python --version

Step 2 : Now, we have to install tornado framework, by using this command

>> pip install tornado

Step 3 : After the installation now we have to create a app.py and write some basic code in it.

Python
import tornado.ioloop import tornado.web  class HomeHandler(tornado.web.RequestHandler):     def get(self):         self.write("Hello, Tornado Home!")  class AnotherHandler(tornado.web.RequestHandler):     def get(self):         self.write("Hello, Tornado Another!")  def make_app():     return tornado.web.Application([         (r"/", HomeHandler),         (r"/another", AnotherHandler),     ])  if __name__ == "__main__":     app = make_app()     app.listen(8888)     print("running in http://localhost:8888/")     tornado.ioloop.IOLoop.current().start() 

Step 4 : Now the project has been created. now the project is ready to serve. To run the development server follow this command.

>> python app.py

The project runs successfully to see that open the serving URL(http://localhost:8888/) and open it on the browser.

In this project, the HomeHandler responds with "Hello, Tornado Home!" when the root URL ("/") is accessed.


Animation2
output


The output shown in the browser upon launching the Tornado program is seen in this screenshot.

Conclusion

In conclusion, By exploring Tornado Framework is uncovered the robust and versatile toolsets for web application. Whether you're building a small-scale application or a complex, real-time system, Tornado's capabilities and performance optimizations make it a framework worth exploring and integrating into your development toolkit.


Next Article
Introduction to Tornado Framework

A

abulhax
Improve
Article Tags :
  • Python
  • Geeks Premier League
  • Geeks Premier League 2023
Practice Tags :
  • python

Similar Reads

    Introduction to JustPy | A Web Framework based on Python
    JustPy is a web framework that leverages the power of Python to create web applications effortlessly. In this article, we'll explore JustPy, its features, and why it's gaining attention among developers. What is the JustPy Module of Python?The JustPy module of Python is a web framework like Django b
    8 min read
    Introduction to Apache Kafka Partitions
    Apache Kafka, a powerful publish-subscribe messaging system, has emerged as the preferred choice of high-volume data streams utilized by international corporations such as LinkedIn, Netflix, and Uber. Lying at the heart of Kafka's superior performance is its design of Kafka partitions.Partitions are
    13 min read
    Python Tornado - Asynchronous Networking
    Traditional synchronous networking models often struggle to keep pace with the demands of modern applications. Enter Tornado-Asynchronous networking, a paradigm-shifting approach that leverages non-blocking I/O to create lightning-fast, highly scalable network applications. In this article, we will
    4 min read
    Tornado-Coroutines and concurrency
    Concurrency is a fundamental aspect of modern programming, especially in web development where handling multiple tasks simultaneously is crucial for performance and responsiveness. Tornado, a Python web framework and asynchronous networking library, excels in this area with its powerful coroutine an
    6 min read
    How to Stop Tornado Web Server
    Tornado is a powerful and scalable web framework for Python that is known for its non-blocking network I/O, making it an excellent choice for building web applications and APIs. When it comes to stopping the Tornado web server, it's essential to do it gracefully to ensure that ongoing connections ar
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences