A Flask app template with integrated SQLAlchemy, authentication, and Bootstrap frontend

Related tags

Flaskflask-bootstrap
Overview

Flask-Bootstrap

Flask-Bootstrap is an Flask app template for users to clone and customize as desired, as opposed to a Flask extension that you can install and use in your existing application.


This version of Flask-Bootstrap app template, v0.2.0, is a distinctly different version of the prior flask application template, now better organized using Flask blueprints. I think users will find this version much better suited for anything larger than the very smallest of server-side web apps.

Nonetheless, in the event that you'd like to use the old flask-bootstrap template, that version can now be found in the old_master branch.


Features

  • Flask, including Flask-SQLAlchemy for user data and Flask-Login for authentication
  • Bootstrap 3
  • Webassets for easy Javascript deployment
  • Targeting OWASP web security standards
  • Python 2 and 3 support

Version

0.2.1

Build Status

Quickstart

  • Install the system dependencies and Python dependencies
  • Customize your config/app.cfg (make create_cfg creates a basic config/local.cfg)
  • Fill out appropriate Makefile variables and run make
  • Then: python run.py or make run

Full installation instructions

The main system dependencies are Python, Postgreql, and their respective development packages. It could be easily adapted to run on MySQL or even SQLite, but the default installation instructions and Makefile below assume the use of PostgreSQL.

Makefile

If you're on Ubuntu or Mint and you using Make, you're in luck. There is a very convenient Makefile to install and run the application (should work with Debian with a few minor changes). If you wish to use the Makefile, then simply fill in the appropriate config variables in the Makefile, run make install to install dependencies, and make run to start the application. The Makefile installation will even create a default local.cfg containing your project's configuration, for you to use and customize.

Otherwise, refer to the instructions below.

1. System dependencies:

On Ubuntu or Debian, first install:

sudo apt-get install postgresql python-dev libpq-dev

Red Hat, Fedora, and other derivatives are said to require (confirmation would be welcome):

yum install postgresql-devel postgresql-libs libpqxx-devel

Here's a brief article on getting these dependencies running on Windows (exact instructions would be welcome).

2. Python virtual environment and dependencies

It's probably a good idea to create a virtual environment for this project using virtualenv and virtualenvwrapper, which are installed using:

pip install virtualenvwrapper

Then, clone the repo, cd into it, and create a project virtual environment. I like to host my virtual environments in each project directory (but include it in the .gitignore so it's not gitable). So something like:

git clone git://github.com/esbullington/flask-bootstrap.git
cd flask-bootstrap
virtualenv venv
source venv/bin/activate

Once you have the virtual environment installed on your system, and the system dependencies, the rest is simple:

pip install -r config/requirements.txt

Configuration

  • If you're using the Makefile, be sure to set your config filename
  • Otherwise, you can either:
    • pass your config file using python manage.py -c config/yourconfig.cfg runserver or else
    • set an environmental variable FLASK_APPLICATION_SETTINGS to point to your config file
  • Check to be sure your SECRET_KEY config setting is indeed secret and cryptographically strong (120+ bits of entropy)
  • The Makefile command make create_cfg sets this SECRET_KEY automatically as part of the config creation

Tests

make test or python manage.py testall

Master:

Build Status

Dev:

Build Status

Changelog

v0.2.1

  • Added filler template pages, including user settings page
  • Reorganized module naming (mod_home->mod_unauthenticated)
  • Restyled Bootstrap in homepage and navbar

v0.2.0

  • Flask Blueprints
  • Flask-assets asset for Javascript and other static assets, based on the webassets module
  • CSRF protection

Roadmap

  • For v0.3.0
    • More unit tests for Flask app and JavaScript
    • Automated app naming through Flask-Script or Makefile
    • Add more and better documentation, using Sphinx
    • More attractive user interface
  • By version 1.0.0
    • Comprehensive security review and tests using OWASP standards
    • Full Windows and OSX support

License

BSD

Owner
Eric S. Bullington
Eric S. Bullington
Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Miguel Grinberg 358 Nov 28, 2022
Curso Desenvolvimento avançado Python com Flask e REST API

Curso Desenvolvimento avançado Python com Flask e REST API Curso da Digital Innovation One Professor: Rafael Galleani Conteudo do curso Introdução ao

Elizeu Barbosa Abreu 1 Nov 14, 2021
Flask Boilerplate - Paper Kit Design | AppSeed

Flask Paper Kit Open-Source Web App coded in Flask Framework - Provided by AppSeed Web App Generator. App Features: SQLite database SQLAlchemy ORM Ses

App Generator 86 Nov 29, 2021
Flask app for deploying DigitalOcean droplet using Pulumi.

Droplet Deployer Simple Flask app which deploys a droplet onto Digital ocean. Behind the scenes there's Pulumi being used. Background I have been Terr

Ahmed Sajid 1 Oct 30, 2021
Flask extension that takes care of API representation and authentication.

Flask-API-Utils Flask-API-Utils helps you to create APIs. It makes responses in appropriate formats, for instance, JSON. All you need to do is to retu

Marsel Mavletkulov 55 Aug 28, 2022
flask-apispec MIT flask-apispec (🥉24 · ⭐ 520) - Build and document REST APIs with Flask and apispec. MIT

flask-apispec flask-apispec is a lightweight tool for building REST APIs in Flask. flask-apispec uses webargs for request parsing, marshmallow for res

Joshua Carp 617 Dec 30, 2022
Intranet de la Rez Flask web app

IntraRez Application Flask de l'Intranet de la Rez. Exigences Python : Probablement = 3.10 à terme, pour l'instant = 3.8 suffit ; Autres packages Li

3 Jul 03, 2022
Brandnew-flask is a CLI tool used to generate a powerful and mordern flask-app that supports the production environment.

Brandnew-flask is still in the initial stage and needs to be updated and improved continuously. Everyone is welcome to maintain and improve this CLI.

brandonye 4 Jul 17, 2022
The Coodesh Python Backend Challenge (2021) written in Flask

Coodesh Back-end Challenge 🏅 2021 ID: 917 The Python Back-end Coodesh Challenge Description This API automatically retrieves users from the RandomUse

Marcus Vinicius Pereira 1 Oct 20, 2021
Flaskr: Intro to Flask, Test-Driven Development (TDD), and JavaScript

Flaskr - Intro to Flask, Test-Driven Development, and JavaScript Share on Twitter As many of you know, Flaskr -- a mini-blog-like-app -- is the app th

Michael Herman 2.2k Jan 04, 2023
Find and notify users in your Active Directory with weak passwords

Crack-O-Matic Find and notify users in your Active Directory with weak passwords. Features: Linux-based Flask-based web app Hashcat or John cracker Au

Adrian Vollmer 92 Dec 31, 2022
A Flask application for Subdomain Enumeration

subdomainer-flask A Flask application for Subdomain Enumeration steps to be done git clone https://github.com/gokulapap/subdomainer-flask pip3 install

GOKUL A.P 7 Sep 22, 2022
A flask template with Bootstrap 4, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.

cookiecutter-flask A Flask template for cookiecutter. (Supports Python ≥ 3.6) See this repo for an example project generated from the most recent vers

4.3k Dec 29, 2022
Flask Web DRY full-stack framework by Problem Fighter

In the name of God, the Most Gracious, the Most Merciful. PF-Flask-Web Documentation Install and update using pip: pip install -U PF-Flask-Web Please

Problem Fighter 2 Jan 20, 2022
Pf-flask-rest-com - Flask REST API Common Implementation by Problem Fighter Library

In the name of God, the Most Gracious, the Most Merciful. PF-Flask-Rest-Com Docu

Problem Fighter 3 Jan 15, 2022
Example Flask application illustrating some of my common practices

Overholt Overholt is an example Flask application illustrating some of my common practices Development Environment At the bare minimum you'll need the

Matt Wright 1.6k Dec 15, 2022
Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications.

Flask Sitemapper Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications. This allows you to create a nice and

6 Jan 06, 2023
Adds Injector support to Flask.

Flask-Injector Adds Injector support to Flask, this way there's no need to use global Flask objects, which makes testing simpler. Injector is a depend

Alec Thomas 246 Dec 28, 2022
:rocket: Generate a Postman collection from your Flask application

flask2postman A tool that creates a Postman collection from a Flask application. Install $ pip install flask2postman Example Let's say that you have a

Numberly 137 Nov 08, 2022
Rubik's cube assistant on Flask webapp

webcube Rubik's cube assistant on Flask webapp. This webapp accepts the six faces of your cube and gives you the voice instructions as a response. Req

Yash Indane 56 Nov 22, 2022