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
Set up a modern flask web server by running one command.

Build Flask App · Set up a modern flask web server by running one command. Installing / Getting started pip install build-flask-app Usage build-flask-

Kushagra Bainsla 5 Jul 16, 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
A weather report application build with Python, Flask, and Geopy.

A weather report application build with Python, Flask, and Geopy. Requirements Python 3

Brandon Wallace 6 May 07, 2022
Cross Origin Resource Sharing ( CORS ) support for Flask

Flask-CORS A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible. This package has a simple philosoph

Cory Dolphin 803 Jan 01, 2023
A basic JSON-RPC implementation for your Flask-powered sites

Flask JSON-RPC A basic JSON-RPC implementation for your Flask-powered sites. Some reasons you might want to use: Simple, powerful, flexible and python

Cenobit Technologies 272 Jan 04, 2023
A service made with Flask and Python to help you find the weather of your favorite cities.

Weather-App A service made with Flask and Python to help you find the weather of your favorite cities. Features Backend using Flask and Jinja Weather

Cauã Rinaldi 1 Nov 17, 2022
A flask template with Bootstrap 4, asset bundling+minification with webpack, starter templates, and registration/authentication.

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 Jan 06, 2023
Browsable web APIs for Flask.

Flask API Browsable web APIs for Flask. Status: This project is in maintenance mode. The original author (Tom Christie) has shifted his focus to API S

Flask API 1.3k Jan 05, 2023
With Flask. Everything in a JSON.

Little Library REST API py 3.10 The only one requeriment it's to have Flask installed. To run this, in ./src/(if you're in PS): $env:FLASK_APP="app

Luis Quiñones Requelme 1 Dec 15, 2021
Python3🐍 webApp to display your current playing music on OBS Studio.

Spotify Overlay A Overlay to display on Obs Studio or any related video/stream recorder, the current music that is playing on your Spotify. Installati

carlitos 0 Oct 17, 2022
A python package for integrating ripozo with Flask

flask-ripozo This package provides a dispatcher for ripozo so that you can integrate ripozo with Flask. As with all dispatchers it is simply for getti

Vertical Knowledge 14 Dec 03, 2018
Flask-app scaffold, generate flask restful backend

Flask-app scaffold, generate flask restful backend

jacksmile 1 Nov 24, 2021
A simple Task todo application built with Flask

Task TODO Table An application built with Flask a Python framework and hosted on Heroku. Important notes GuniCorn (Green Unicorn): is a Python WSGI HT

DCN (Dubem Celestine Nwabuisi) 1 Dec 15, 2021
A simple example using Flask inside a container

This is a simple example of how create a container for a Python Flask Web Application using Docker.

Fazt Web 8 Aug 30, 2022
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
iloveflask is a Python library to collect functions that help a flask developer generate reports, config files and repeat code.

I Love Flask iloveflask is a Python library to collect functions that help a flask developer generate reports, config files and repeat code. Installat

2 Dec 29, 2021
YAML-formatted plain-text file based models for Flask backed by Flask-SQLAlchemy

Flask-FileAlchemy Flask-FileAlchemy is a Flask extension that lets you use Markdown or YAML formatted plain-text files as the main data store for your

Siddhant Goel 20 Dec 14, 2022
Full-Stack application that visualizes amusement park safety.

Amusement Park Ride Safety Analysis Project Proposal We have chosen to look into amusement park data to explore ride safety relationships visually, in

Michael Absher 0 Jul 11, 2021
A Python, Flask login system

Python Login System This is a basic login + authenticason system for flask using Flask_Login and Flask_SQLAlchemy Get started on your own To use this

MrShoe 0 Feb 02, 2022
Seamlessly serve your static assets of your Flask app from Amazon S3

flask-s3 Seamlessly serve the static assets of your Flask app from Amazon S3. Maintainers Flask-S3 is maintained by @e-dard, @eriktaubeneck and @SunDw

Edd Robinson 188 Aug 24, 2022