Flask Base screenshot

Flask Base

Author Avatar Theme by Mcescalante
Updated: 22 Oct 2017
6 Stars

Flask boilerplate / base / starter project for any type of Flask application

Categories

Overview

Flask Base is a strong Flask base/boilerplate that focuses on simplicity while still incorporating modern tooling and following best web practices. It provides a solid foundation for building Flask applications.

Features

  • Always updated, production ready, and utilizes modern tooling
  • Supports both Python 2 & 3
  • Includes a basic User model with Login & Registration ready
  • Blueprint ready for easy integration (see app/account for sample)

Installation

  1. Clone or download the Flask Base repository.
  2. Open the app/config.py file and comment out the line for sqlite configuration (line 11). Uncomment either the mysql (lines 19-20) or postgres (lines 23-24) configuration depending on the database you want to use. Make sure to change the database name and add any necessary authentication details to the connection string.
  3. Use pip to install the required libraries for the chosen database. If using mysql, run pip install -r requirements.txt/mysql.txt inside the virtual environment. If using postgres, run pip install -r requirements.txt/postgres.txt inside the virtual environment.
  4. (Optional) Set up mail functionality by creating an account on sparkpost.com. Set the SPARKPOST_API_KEY environment variable in your local environment using export SPARKPOST_API_KEY='yourkeyhere'. Update the mail configuration variables in the config.py file.
  5. Deploy the application to a server or service of your choice. Basic instructions for deploying on a VPS can be found here (More detailed deployment options will be provided in the future).

Summary

Flask Base is a Flask base/boilerplate that provides a simple and modern starting point for building Flask applications. It includes key features such as support for Python 2 & 3, a basic User model with Login & Registration, and easy integration with blueprints. Installation is straightforward and includes optional setup for alternate databases and email functionality. Overall, Flask Base offers a solid foundation for developing Flask applications with best web practices.