Flask is considered more Pythonic than the Django web framework because in common situations the equivalent Flask web application is more explicit.

Flask Web Project

Flask Setup

  • Python Development Environment
  • Installation - Flask depends on some external libraries, like Werkzeug and Jinja2. Werkzeug is a toolkit for WSGI, the standard Python interface between web applications and a variety of servers for both development and deployment. Jinja2 renders templates.
  • Quickstart - Eager to get started? This page gives a good introduction to Flask. It assumes you already have Flask installed. If you do not, head over to the Installation section.

Flask Project Structure

How To Structure Large Flask Applications - There are many methods and conventions for structuring Python web applications. Although certain frameworks are shipped with tools (for scaffolding) to automate — and ease — the task (and the headaches), almost all solutions rely on packaging / modularizing applications as the codebase gets distributed logically across related files and folders.

Module Basics

Module Name = mymodule


from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound

mymodule = Blueprint('mymodule', __name__,

@mymodule.route('/', defaults={'mymodule': 'index'})

def show(mymodule):
    title = 'My Module'
        return render_template('mymodule/%s.html' % mymodule,title=title)
    except TemplateNotFound:


Module Templates

{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}

{% block page_content %}
    <div class="page-header">
        <h1>My Module</h1>
{% endblock %}



Jinja2 is a modern and designer-friendly templating language for Python, modelled after Django’s templates.1

JavaScript Frontend


Vue.js is an open-source progressive JavaScript framework for building user interfaces. Integration into projects that use other JavaScript libraries is made easy with Vue because it is designed to be incrementally adoptable. Vue can also function as a web application framework capable of powering advanced single-page applications.2



Flask-Bootstrap packages Bootstrap into an extension that mostly consists of a blueprint named ‘bootstrap’. It can also create links to serve Bootstrap from a CDN.3


Flask-Vue packages Vue.js and many extended scripts into an extension.4


Flask-SQLAlchemy - The SQLAlchemy SQL Toolkit and Object Relational Mapper is a comprehensive set of tools for working with databases and Python. It has several distinct areas of functionality which can be used individually or combined together. 5


Flask-WTF - Simple integration of Flask and WTForms, including CSRF, file upload and Recaptcha integration.6

Last edited by MichaelAlber .
Page last modified on Saturday December 22, 2018 17:55:13 UTC.


Linux Command Line and Shell Scripting Bible Linux Command Line and Shell Scripting Bible - Linux Command Line and Shell Scripting Bible is your essential Linux guide. With detailed instruction and abundant examples, this book teaches you how to bypass the graphical interface and communicate directly with your computer, saving time and expanding capability.

Linux Bible Linux Bible - Linux continues to be an excellent, low-cost alternative to expensive operating systems. Whether you're new to Linux or need a reliable update and reference, this is an excellent resource. Veteran bestselling author Christopher Negus provides a complete tutorial packed with major updates, revisions, and hands-on exercises so that you can confidently start using Linux today.

Learning Python Learning Python - Portable, powerful, and a breeze to use, Python is the popular open source object-oriented programming language used for both standalone programs and scripting applications.

Modern PHP: New Features and Good Practices Modern PHP: New Features and Good Practices - PHP is experiencing a renaissance, though it may be difficult to tell with all of the outdated PHP tutorials online. With this practical guide, you'll learn how PHP has become a full-featured, mature language with object-orientation, namespaces, and a growing collection of reusable component libraries.