Cookiecutter Flask screenshot

Cookiecutter Flask

Updated: 13 Aug 2025
4728 Stars

A flask template with Bootstrap, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.

Categories

Overview:

cookiecutter-flask is a Flask template that supports Python ≥ 3.8. It is a tool for quickly generating Flask applications with a set of predefined features and best practices. It provides a structure for building Flask apps using Bootstrap 5 and Font Awesome 6, Flask-SQLAlchemy for easy database integration, Flask-WTForms for form handling, Flask-Login for authentication, and Flask-Bcrypt for password hashing. It also includes pytest and Factory-Boy for testing, Flask-Cache for caching, and a debug toolbar for easy debugging. The template follows the Twelve-Factor App methodology for configuration and utilizes the Blueprints and Application Factory patterns for structuring Flask apps.

Features:

  • Bootstrap 5 and Font Awesome 6 with starter templates
  • Flask-SQLAlchemy with basic User model
  • Easy database migrations with Flask-Migrate
  • Configuration in environment variables, as per The Twelve-Factor App
  • Flask-WTForms with login and registration forms
  • Flask-Login for authentication
  • Flask-Bcrypt for password hashing
  • Procfile for deploying to a PaaS (e.g. Heroku)
  • pytest and Factory-Boy for testing (example tests included)
  • Flask’s Click CLI configured with simple commands
  • CSS and JS minification using webpack
  • npm support for frontend package management
  • Caching using Flask-Cache
  • Useful debug toolbar
  • Utilizes best practices: Blueprints and Application Factory patterns

Installation:

To install and use cookiecutter-flask, follow these steps:

  1. Make sure you have Python ≥ 3.8 installed on your system.
  2. Create a virtual environment (e.g. using virtualenv).
  3. Activate the virtual environment.
  4. Install cookiecutter-flask by running the command: pip install cookiecutter-flask.
  5. Run the command: cookiecutter https://github.com/cookiecutter-flask/cookiecutter-flask.

Once the project has been generated, further configuration steps are required. Please follow the instructions provided in the README of the generated project for configuring and running the application.

Summary:

cookiecutter-flask is a Flask template that provides a convenient way to start building Flask applications with a set of preconfigured features and best practices. It supports Python ≥ 3.8 and includes features like Bootstrap integration, database integration with Flask-SQLAlchemy, user authentication with Flask-Login, and debugging support with the debug toolbar. By following the installation and configuration steps, developers can easily create a new Flask application and start building on top of it.