Cookiecutter Flask

screenshot of Cookiecutter Flask
flask
bootstrap

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

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

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.

flask
Flask

Flask is a lightweight and popular web framework for Python, known for its simplicity and flexibility. It is widely used to build web applications, providing a minimalistic approach to web development with features like routing, templates, and support for extensions.

bootstrap
Bootstrap

Bootstrap is the most popular CSS Framework for developing responsive and mobile-first websites.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.