Practical Web Development & Engineering Solutions - Read Write Execute

FLASK – a micro web framework for python

Ankit Agrawal
Ankit Agrawal
Published on January 11, 2019 · 1 min read

Introduction

Flask is a micro web framework for python. It is based on Werkzeug and Jinja. it was developed by Armin Ronacher in 2004. It’s called a microframework as it’s not required any tool or library.

Why Flask

Flask is more suitable for python project as it’s easy to learn for a beginner. It is designer in such a manner so that it can easily use and extend. It’s a very lightweight microframework to create python web applications.

Components

  • Werkzeug
  • Jinja

Features

  • Easy to use and extensible
  • Templating
  • Development server and debugger
  • Support secure cookies
  • Support unit testing
  • Unicode based
  • Lightweight

Example

from flask import Flask
app = Flask(__name__)

@app.route("/")
def home():
 return "Home Page"

@app.route("/about")
def about():
return "About Page"

@app.route("/contact")
def contact():
return "Contact Page"

if __name__ == "__main__":
app.run()
Was this article helpful?
Ankit Agrawal

Ankit Agrawal

Author & Senior Engineer at CodeExecute

Writing practical engineering guides, debugging real-world bottlenecks, and creating free tools for developer productivity.

← Previous Article Gutenberg – a new definition for an editor Next Article → 7 techniques to increase on page seo