Flask - Python Web Framework

Flask is called a micro-framework; meaning that it only provides the absolute minimum requirements needed to get a web project up and running quickly, without any of the hassles of a more fully involved web framework.

Flask is written in Python and is based on Werkzeug and Jinja 2.

To get a Flask project started...

Easy setup:


>>> pip install Flask
>>> pip install Flask-Login

Flask Features

  1. Built in development server and debugger
  2. Integrated unit testing support
  3. RESTful request dispatching (bingo!)
  4. Uses Jinja2 templating
  5. Support for secure cookies (client side sessions)
  6. 100% WSGI 1.0 compliant
  7. Unicode based
  8. Extensively documented

Web development one drop at at time...

The Most Basic Flask Example:


from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, Monty!'

if __name__ == '__main__':
    app.run()

A great example of the simplicity of Flask is a project called Flaskr

Craig Derington

Full Stack Developer. Linux, Docker, Python, Celery, Flask, Django, Go, MySQL, MongoDB and Git. Modern, secure, high-performance applications capable of processing millions of transactions a day.

comments powered by Disqus