Flask is a lightweight web application framework written in Python. Flask depends on two external libraries, Werkzeug and Jinja2.
- Werkzeug is a toolkit for Web Server Gateway Interface (WSGI)
- Jinja2 renders templates
Flask is called as microframework because it keeps the core simple. It has no database abstraction layer, supports extensions (object-relational mappers, form validation, open authentication technologies). It have Google App Engine Compatibility and RESTful request dispatching.
Let install the Flask.
Here we will be using windows 8 and python 2.7
To install all them in once we will used 'Virtualenv' and there are some more ways. 'Virtualenv' provides a clever way to keep different project environments isolated.
As we are on Windows and we don’t have the easy_install command. firstly we have to install it.
1. install pip
1.1 Assuming you are using Python 2.7 on the default path, so if have not add python to your path, added it now:
;C:\Python27\Scripts
1.2 Now you have easy_install so we can use it to install pip by below command
easy_install pip
2 Create virtualenv environment
2.1 Install virtualenv in windows
2.2 After virtualenv installed, we can create our own environment or browser to your location from CMD. we usually create a project folder and a venv folder within
virtualenv venv
2.3 To activate the corresponding environment
venv\scripts\activate
you should now be using your virtualenv (notice how the prompt of your shell has changed to show the active environment)
3. Installing Flask
The following command to get Flask activated in our virtualenv:
pip install Flask
Nest post we will write simple REST services
Awesome Post. Great Content. It is very inspiring to read your post. Waiting for your updates.
ReplyDeletePython Flask Training
Flask Framework
Python Flask Online Training