2. Whatwillwedo inthissession?
1. Understand
about Flask
2. Why can it be
used over other
tech stacks like
springboot, Nodejs.
3. Installing Flask
in Linux or
Windows.
4. Executing a
basic program to
understand the
working of Flask.
5. Understanding
REST APIs in
Flask with a demo
project.
6. Understanding
the working of
Microservices with
a project.
3. What isFlask?
Flask is a micro web application framework written in
python .
It basically uses Werkzeug toolkit and jinja2 template to
run a web application.
Werkzeug toolkit: It is a WSGI toolkit
which implements requests, response objects and utility
functions and this enables building a web framework on
top of it.
Jinja2 : It is one of the popular templating engine for
python. A web templating system combines a template
with certain data source to render dynamic web pages.
4. WhyisFlaskeasiertoimplementthenthe
othertechstacks?
As we know that Flask is a Micro Framework it does not
presume or force the developer to use a particular tool or
library.
The main differentiating factor in Flask is that it has no
database abstraction layer, form validation or any other
pre-existing third party libraries providing common
functions, however Flask supports extension that can
add application features as if they were implemented in
flask.
Extensions in flask exist for object relational mappers,
form validation, upload handling , various open
authentication technologies and several framework related
tools.
5. Featuresof Flask
It contains
development
server and
debugger.
Integrated
support for Unit
testing.
RESTful request
dispatching.
A lot of extensions
available to
enhance the
desired features.
6. Installation ofFlask
Installing and activating the virtual Environment:
python3 -m pip install virtualenv
python3 -m virtualenv venv
source venv/bin/activate
For windows:
venvScriptsactivate
Installing Flask inside the virtual Envirorment.
pip install Flask