This is an exercise with flask in order to show how it can be implemented.
This API is going to be consumed by a web application also developed with flask. Here is the link to the repository:
https://github.com/eso31/WebApp-flask
In order to make this application work, you must have the secrets for the twitter API. You can get them at https://apps.twitter.com/
How to run:
python api.py
If you want to verify if the API is working properly without the web application, you should access http://localhost:5000/search/spotgabbiani
You should get a json with all the information.