Introspection of one simple github project

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

source repo

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:

  • logbook
  • fabric
  • zmq simple publisher and subscriber model
  • storing and retrieving from pymongo minimally
  • In the template the tweets are retrieved frequently with javascript trick(ajax + setTimeout function).
  • disqus comment framework also embedded

finally,

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.

Advertisements

About Navaneethan

mixed feelings...
This entry was posted in Flask, General, Python and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s