Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.

Related tags

Flaskflask-starter
Overview

Flask-Starter

Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development. It has all the ready-to-use bare minimum essentials.

Features

  • Flask 2.0, Python (PEP8)
  • Signup, Login with (email, password)
  • Forget/reset passwords
  • Email verification
  • User profile/password updates
  • User roles (admin, user, staff)
  • User profile status (active, inactive)
  • Admin dashboard for management
  • Contact us form
  • Basic tasks/todo model (easily replace with your use-case)
  • Bootstrap template (minimal)
  • Utility scripts (initiate dummy database, run test server)
  • Test & Production Configs
  • Tests [To Do]

Flask 2.0 async or not async

  • asynchronous support in Flask 2.0 is an amazing feature
  • however, use it only when it has a clear advantage over the equivalent synchronous code
  • write asynchronous code, if your application's routes, etc. are making heavy I/O-bound operations, like:
    • sending emails, making API calls to external servers, working with the file system, etc
  • otherwise, if your application is doing CPU-bound operations or long-running tasks, like:
    • processing images or large files, creating backups or running AI/ML models, etc
    • it is advised to use tools like "Celery" or "Huey", etc.

async demo in our application

Check emails/__init__.py to see how emails being sent in async mode

Primary Goals

  • To help you save lots of hours as a developer, even if for a hobby project or commercial project :-)
  • To provide basic features of standard web apps, while staying as unopinionated as possible
  • To make back-end development quick to start, with robust foundations
  • To help you quickly learn how to build a Flask based web application
  • To help you quick start coding your web app's main logic and features

Table of Contents

  1. Getting Started
  2. Screenshots
  3. Project Structure
  4. Modules
  5. Testing
  6. Need Help?

Getting Started

clone the project

$ git clone https://github.com/ksh7/flask-starter.git
$ cd flask-starter

create virtual environment using python3 and activate it (keep it outside our project directory)

$ python3 -m venv /path/to/your/virtual/environment
$ source <path/to/venv>/bin/activate

install dependencies in virtualenv

$ pip install -r requirements.txt

setup flask command for our app

$ export FLASK_APP=manage.py
$ export FLASK_ENV=development

create instance folder in /tmp directory (sqlite database, temp files stay here)

$ mkdir /tmp/flaskstarter-instance

initialize database and get two default users (admin & demo), check manage.py for details

$ flask initdb
  1. start test server at localhost:5000
$ flask run

Screenshots

Homepage SignUp Login Dashboard Tasks Profile Admin

Project Structure

flask-starter/
├── flaskstarter
│   ├── app.py
│   ├── config.py
│   ├── decorators.py
│   ├── emails
│   │   └── __init__.py
│   ├── extensions.py
│   ├── frontend
│   │   ├── forms.py
│   │   ├── __init__.py
│   │   ├── models.py
│   │   └── views.py
│   ├── __init__.py
│   ├── settings
│   │   ├── forms.py
│   │   ├── __init__.py
│   │   └── views.py
│   ├── static
│   │   ├── bootstrap.bundle.min.js
│   │   ├── bootstrap.min.css
│   │   └── jquery.slim.min.js
│   ├── tasks
│   │   ├── forms.py
│   │   ├── __init__.py
│   │   ├── models.py
│   │   └── views.py
│   ├── templates
│   │   ├── admin
│   │   │   └── index.html
│   │   ├── dashboard
│   │   │   └── dashboard.html
│   │   ├── frontend
│   │   │   ├── change_password.html
│   │   │   ├── contact_us.html
│   │   │   ├── landing.html
│   │   │   ├── login.html
│   │   │   ├── reset_password.html
│   │   │   └── signup.html
│   │   ├── layouts
│   │   │   ├── base.html
│   │   │   └── header.html
│   │   ├── macros
│   │   │   ├── _confirm_account.html
│   │   │   ├── _flash_msg.html
│   │   │   ├── _form.html
│   │   │   └── _reset_password.html
│   │   ├── settings
│   │   │   ├── password.html
│   │   │   └── profile.html
│   │   └── tasks
│   │       ├── add_task.html
│   │       ├── edit_task.html
│   │       ├── my_tasks.html
│   │       └── view_task.html
│   ├── user
│   │   ├── constants.py
│   │   ├── __init__.py
│   │   └── models.py
│   └── utils.py
├── manage.py
├── README.md
├── requirements.txt
├── screenshots
└── tests
    ├── __init__.py
    └── test_flaskstarter.py

Modules

This application uses the following modules

  • Flask
  • Flask-SQLAlchemy
  • Flask-WTF
  • Flask-Mail
  • Flask-Caching
  • Flask-Login
  • Flask-Admin
  • pytest
  • Bootstrap (bare minimum so that you can replace it with any frontend library)
  • Jinja2

Testing

Note: This web application has been tested thoroughly during multiple large projects, however tests for this bare minimum version would be added in tests folder very soon to help you get started.

Need Help? 🤝

If you need further help, reach out to me via Twitter DM.

Owner
Kundan Singh
Python, NodeJS, JavaScript Developer
Kundan Singh
Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.

The Mixer is a helper to generate instances of Django or SQLAlchemy models. It's useful for testing and fixture replacement. Fast and convenient test-

Kirill Klenov 870 Jan 08, 2023
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
SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF).

Flask-SeaSurf SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF). CSRF vulnerabilities have been found in large and popular

Max Countryman 183 Dec 28, 2022
This is a API/Website to see the attendance recorded in your college website along with how many days you can take days off OR to attend class!!

Bunker-Website This is a GUI version of the Bunker-API along with some visualization charts to see your attendance progress. Website Link Check out th

Mathana Mathav 11 Dec 27, 2022
This is a simple web application using Python Flask and MySQL database.

Simple Web Application This is a simple web application using Python Flask and MySQL database. This is used in the demonstration of development of Ans

Alaaddin Tarhan 1 Nov 16, 2021
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
Quick and simple security for Flask applications

Note This project is non maintained anymore. Consider the Flask-Security-Too project as an alternative. Flask-Security It quickly adds security featur

Matt Wright 1.6k Dec 19, 2022
Flask-Discord-Bot-Dashboard - A simple discord Bot dashboard created in Flask Python

Flask-Discord-Bot-Dashboard A simple discord Bot dashboard created in Flask Pyth

Ethan 8 Dec 22, 2022
A Flask web application that manages student entries in a SQL database

Student Database App This is a Flask web application that manages student entries in a SQL database. Users can upload a CSV into the SQL database, mak

rebecca 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
Adds SQLAlchemy support to Flask

Flask-SQLAlchemy Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application. It aims to simplify using SQLAlchemy

The Pallets Projects 3.9k Dec 29, 2022
This is a repository for a playlist of videos where I teach building RESTful API with Flask and Flask extensions.

Build And Deploy A REST API with Flask This is code for a series of videos in which we look at the various concepts involved when building a REST API

Ssali Jonathan 10 Nov 24, 2022
Socket.IO integration for Flask applications.

Flask-SocketIO Socket.IO integration for Flask applications. Installation You can install this package as usual with pip: pip install flask-socketio

Miguel Grinberg 4.9k Jan 02, 2023
A flask app that turn image into ASCII art

ASCII art A flask app that turn image into ASCII art. This app has been deployed to https://motmaytinh.herokuapp.com Getting Started These instruction

Trần Ngọc Quý 1 Jan 13, 2022
The Snoopy boilerplate in flask framework for development enterprise application.

Snoopy What is snoopy! The "Snoopy" boilerplate in flask framework for development enterprise application. Motivation In my 10 years of development ex

Bekhzod 2 Sep 29, 2022
A gRpc server like Flask (像Flask一样的gRpc服务)

Mask A gRpc server just like Flask. Install Mask support pypi packages, you can simply install by: pip install mask Document Mask manual could be fou

吴东 16 Jun 14, 2022
A simple FastAPI web service + Vue.js based UI over a rclip-style clip embedding database.

Explore CLIP Embeddings in a rclip database A simple FastAPI web service + Vue.js based UI over a rclip-style clip embedding database. A live demo of

18 Oct 15, 2022
A Cyberland server written in Python with Flask.

Cyberland What is Cyberland Cyberland is a textboard that offers no frontend. Most of the time, the user makes their own front end. The protocol, as f

Maxime Bouillot 9 Nov 26, 2022
Source code for backpainfree.org - a Q&A platform similar to StackOverFlow

Source code for backpainfree.org - a Q&A platform similar to StackOverFlow, which is designed specifically for people with back pain problems. Users can ask questions, post answers and comments, vote

Olzhas Arystanov 8 Dec 11, 2022
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