Build a Twitter Analytics App
6 Writing the Backend Twitter Server
9 Displaying our Data using the Flask Webserver
Welcome to the Twitter Analyser project, where you will learn how to build a Python / Flask app that will analyse Twitter data in real time.
Unlike other tutorials, I’d like to do this slightly differently. Normal tutorials just give you the code and say Here you go. This is how you do it.
In more and more online forums, I see beginners complaining that they don’t know what to do next, after they have learnt the basics of programming. They are asked to look at the code of big projects, but this often looks intimidating. Or they are told to build their own projects, but again, don’t know where to begin, and so never get started.
In this project, I’d like to do things properly, the way you’d do them if you were on a job, or a paid project.
So we’ll do a design first, write tests, and most importantly, write the code in small chunks. Most projects look complex because you are seeing the end result after months of work. But if you could see the project being built from the ground up, like a building, you’d see it’s just a sum of its parts. We’ll also look at how to break your code down into functions and classes, how to review code and design documents, amongst other things.
Each section of this project will have a bit of theory, and then some exercises for you. The idea is that you develop along with me, so that you learn how to build bigger projects.
If you get stuck, you can look at my solution. Or you can continue with your own.
All the code for this project is available on Github here. We will be developing the code in small parts, and that’s how it is stored in the server.
These are some of the technologies we will use: Python 3, Flask, SqLite, Twitter API, Google Charts (for the graphs).
To get started, make sure you:
1 Have a Twitter developers account.
2 Have a Github account. If you have never used Git before, I have a tutorial for complete beginners. This is not strictly required, but will be useful if you ever want to share your code with others.
Right, to start off, we will first design our solution.
PS: Get a free PDF, Python: From Apprentice to Master
Subscribers will also get exclusive content I won't share on my blog.