Its quite a some time, that I have been exploring Python's Flask framework so was a good time for this very basic kind of blog post to come up with now.
Flask is python's Micro-framework based on Werkzeug, Jinja 2 and good intentions. Flask is often used for small project or single page application. Micro used in its name simply means smaller core with extensive scalability scope (through extensions).
Here are few quick highlights of Flask
Almost no learning curve
If you already know any of the existing programming language and/or Python then one start developing applications in Flask very quickly.
Flask is remarkably lightweight and development on actual project can be started much quicker than other frameworks. Core Flask lacks few of the important functionality such as DB abstraction layer but it can further be enhanced through various already available extensions. Due to its lightweight nature and the types of application being developed Bootstraping is not available rather not required in Flask.
Quickly installation through Virtualenv
Virtualenv helps in setting up the multiple applications through isolated virtualized python environments. We can have multiple application with different kinds of dependencies associated with no way it getting conflicted with other Pyhton applications.
Flask inherently supports Jinja 2 - most capable template engine for Python which comes with an exceptional unicode support. Jinja 2 takes care of complete presentation layer. It also provides better control over the execution environment in terms of security aspect.
Python's WSGI 1.0 compliant
Flask is 100% compliant with WSGI 1.0 - Python Web Server Gateway Interface v1.0. It facilitates universal interconnectivity between Servers and Applications.
Simple "Hello world" program
from flask import Flask #import Flask class app = Flask(__name__) @app.route("/") # syntax for routing def hello(): return "Hello World!" if __name__ == "__main__": app.run() # Starts http server
Soon this post will follow up with a quick installation guide and little application.