Keywords: debugger, fully featured request and response objects,

 

Keywords: Python, Flask, Werkzeug,
Jinja2, SQLAlchemy, sqlite3, Flask_WTF

 

 

 

1                  
Introduction

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

Web Technologies, particularly
the Internet, have become an important

Part of the
business world over the past few years. People have become

Accustomed to
searching the internet for data, sending e-mail, or making simple purchases
electronically. So making a good and secure web application is always the first
priority of any organization.

 

   Today organization’s use various kind of
programming language for creating web applications, some of them are like PHP,
Java, .net etc. but

There is a new
language in the market which is being introduced by Python called Flask.

What specific notation is stated in this research paper?

Here a functioning
model is developed by the author, working on the analysis with the LIVE flask
based web application.

 

 

2                  
Python

 

Python is a
high-level programming language for general purpose programming, Python has a design philosophy that
emphasizes code readability, and a syntax that allows programmers to express
concepts in fewer lines of code.

Python features a dynamic type system and automatic memory management. It
supports multiple programming paradigms, including object-oriented, functional
and procedural, and has a large and comprehensive standard library. Its
interpreter are available in for many operating systems, and this programming
language is completely open source.

 

 

3                  
Flask

           

Flask is  a python web framework built with a
small  core and easy-to-extend
philosophy. Flask is based on
werkzeug toolkit and jinja2 template engine. It is BSD licensed.

Applications
that use FLASK framework includes
pinterest, LinkedIn, and community web page for Flask itself.

Flask
called micro framework because it does not required particular tools or
libraries. It has no database abstraction
layer, form validation, or any other components where pre-existing third-party
libraries provide common functions.

For
example, here’s a valid “hello world” web application with Flask

/**

 

from
flask import Flask

 

app
= Flask(__name__)

 

@app.route(‘/’)

def
hell():

            return ‘hello world’

 

if
__name__ == ‘__main__’:

            app.run()

                                           **/

 

 

4                  
Werkzeug

 

Werkzeug
is a WSGI utility library for python. It’s widely ised and BSD licensed.
Werkzeug is simple and powerful.

Werkzeug started as
a simple collection of various utilities for WSGI applications and has become
one of the most advanced WSGI utility modules. It includes a powerful debugger,
fully featured request and response objects, HTTP utilities to handle entity
tags, cache control headers, HTTP dates, cookie handling, file uploads, a powerful
URL routing system and a bunch of community contributed add-on modules.

It does Unicode and
doesn’t enforce a specific template engine, database adapter or anything else.
It doesn’t even enforce a specific way of handling requests and leaves all that
up to the developer.

For
example:

 

/**

 

            from werkzeug.wrapper import
Request, Response

@Request.application

Def
application(request):

            Return Response(‘hello world’)

 

If
__name__ == ‘__main__’:

 

            from werkzeug.serving import
run_simple

            run_simple(‘localhost’, 4000,
application)

 

                                                                                  **/

 

5                
Jinja

 

It
is a template engine for python programming language.

The Jinja template engine
allows customization of tags, filters,
tests, and globals. Also, unlike the Django template engine, Jinja allows the
template designer to call functions with arguments on objects. Jinja is Flask’s default template engine.

 

Here is
a small example of a template file ‘example.html.jinja’5

 

   

{{ variable|escape<br> }}

 

 

  {%- for item in item_list %}

    {{ item }}{% if not loop.last %},{% endif
%}

  {%- endfor %}

 

and
templating code:

from jinja2 import Template

with
open(‘example.html.jinja’) as f:

    tmpl = Template(f.read())

print tmpl.render(

    variable = ‘Value with
data’,

    item_list = 1, 2, 3, 4, 5, 6

)

This
produces the HTML string:

 

   

Value with<br> <unsafe> data

 

 

    1,

    2,

    3,

    4,

    5,

    6

 

 

 

 

 

References:

 

            1       https://www.fullstackpython.com/flask.html

           

            2       https://en.wikipedia.org/wiki/Jinja_(template_engine)

 

            3       http://werkzeug.pocoo.org/