Simple Json Response basic test between Flask and Django

Django and Flask are two well known Python web frameworks. There are lot of benchmarks claim Flask is 2xfaster for simple JSON Response, one such is Techempower. After lookinginto the source, it struckme Django can do better! I will compare Flask and Django for simple json response. The machine used is Macbook pro, Intel Core i5-4258U CPU @ 2.40GHz,with 8 GB Memory on OS X 10.10.3. gunicorn==19.3.0 will be used for serving WSGI application. [Read More]

Deploying full fledged flask app in production

This article will focus on deploying flask app starting from scratch like creating separate linux user, installating database, web server. Web server will be nginx, database will be postgres, python 2.7 middleware will be uwsgi, server ubuntu 13.10 x64. Flask app name is fido. Demo is carried out in Digital ocean. Step 1 - Installation Python header root@fido:~# apt-get install -y build-essential python-dev Install uwsgi dependencies root@fido:~# apt-get install -y libxml2-dev libxslt1-dev Nginx, uwsgi [Read More]

SSL for flask local development

Recently at HasGeek we moved all our web application to https. So I wanted to have all my development environment urls to have https. How to have https in flask app Method 1 from flask import Flask app = Flask(__name__)'', debug=True, port=8100, ssl_context='adhoc') In the above piece of code, ssl_context variable is passed to werkezug.run_simple which creates SSL certificates using OpenSSL, you may need to install pyopenssl. I had issues with this method, so I generated self signed certificate. [Read More]
python  ssl  https  flask 

Microframeworks produces micro level progress in project

I created my first web app in PHP 5.2 with * no frameworks *, then learned drupal, tried codeigniter, joomla. Then I learned Rails for HappySchool project and learned Django since I am python lover. Tried Pylons and settled with Flask and experimenting brubeck. Flask is microframework built around werkzeug datastructures. Advantages Vs Disadvantages Learn in depth working of HTTP vs Time consuming Opportunity to create library vs Time consuming Less batteries available vs More development time It is highly loosely coupled which is good to replace the parts with best tools if available. [Read More]