I had today few free hours..Are you free now?
Recently I came across this project called sachintweets in github. I wanted to introspect the code to learn something from it.So, just a post like bookkeeping.
Things I learned from github project sachintweets
This project fetches you the tweets of Sachin Tendulkar in various categories like top retweeted tweets, recent tweets.
It is implemented in Flask and the backend was used mongodb. It is a very minimal flask application. It does crud operations with mongodb.If you want to learn read and write in mongodb this helps for you.
The backend and frontend is simple tricks.
To pull the realtime tweets and store it into db, The developer used ZMQ as intermediate service as extra level. This part, just using twitter library to pull the tweets from this webservice. Once it is pulled, tweets are published into ZMQ channel.After that, from ZMQ subscribers are fetching the pushed tweets and inserting into mongodb.
The storage part was done. Now to display, just a read from db and render the template.
May be you got some oppurtunity to learn few libraries here:
- zmq simple publisher and subscriber model
- storing and retrieving from pymongo minimally
- disqus comment framework also embedded
overall, it was a complete project which is useful to derive some content if you have few free hours.Kudos to the developer for making it public.