Introduction to Flask for Python

Build a Twitter Analytics App

1 Introduction: Start Here

2 The First Step: Design Your Solution

3 In Which I Rant a Little

4  Design Solution

5 Writing Great Code

6 Writing the Backend Twitter Server

Writing the Code in Small Parts: Part 1, The Basic App

Part 2: Adding a Counter to Exit

Part 3: Adding Language and Retweet Count

Part 4: Organising Our Code

7 Adding the Data to a Database

8 Testing: What and How to Test

8.1 Testing Our Frontend

8.2 Testing Our Backend

9 Displaying our Data using the Flask Webserver

9.1 Introduction to Flask

9.2 Adding templates to our Flask app

9.3 Displaying our Tweets in the Flask Web Server

10 Future Work and Improvements

This is a very quick introduction to the Flask web server. Make sure you have the hello world equivalent of Flask working, and then briefly look at the quickstart.

We’ll start very simple, just one step above the hello world level program. Get the code from here.

All the code above does is print Most used languages on Twitter: All Tweets when you go to


This time, we are adding two new routes. will take us to the top tweets page. will take us (surprise) to the trends page.