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
An easy way to build your flask skeleton.

Flider What is Flider Flider is a lightweight framework that saves you time by creating a MVC compliant file structure and includes basic commonly use

Trevor Engen 8 Nov 17, 2022
Control YouTube, streaming sites, media players on your computer using your phone as a remote.

Media Control Control Youtube, streaming sites, media players on your computer using your phone as a remote. Installation pip install -r requirements.

Shreyas Daniel 10 Dec 08, 2022
A web application that consists of a collection of board games

PyBoardGame About This website contains a collection of board games for users to enjoy, as well as various guides for the games. The web app is built

Larry Shi 0 Aug 11, 2021
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-redmail - Email sending for Flask

Flask Red Mail: Email Sending for Flask Flask extension for Red Mail What is it?

Mikael Koli 11 Sep 23, 2022
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
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI

SAFRS: Python OpenAPI & JSON:API Framework Overview Installation JSON:API Interface Resource Objects Relationships Methods Custom Methods Class Method

Thomas Pollet 365 Jan 06, 2023
Getting Started with Docker and Flask

Getting-Started-with-Docker-and-Flask Introduction Docker makes it easier, simpler and safer to build, deploy and manage applications in a docker cont

Phylis Jepchumba 1 Oct 08, 2021
RestApi_flask_sql.alchemy - Product REST API With Flask & SQL Alchemy

REST API With Flask & SQL Alchemy Products API using Python Flask, SQL Alchemy and Marshmallow Quick Start Using Pipenv # Activate venv $ pipenv shell

amirwahla 1 Jan 01, 2022
Easy file uploads for Flask.

Library that works with Flask & SqlAlchemy to store files on your server & in your database Read the docs: Documentation Installation Please install t

Joe Gasewicz 145 Jan 06, 2023
É uma API feita em Python e Flask que pesquisa informações em uma tabela .xlsx e retorna o resultado.

API de rastreamento de pacotes É uma API feita em Python e Flask que pesquisa informações de rastreamento de pacotes em uma tabela .xlsx e retorna o r

Marcos Beraldo Barros 4 Jun 27, 2021
Parallel TTS web demo based on Flask + Vue (Vuetify).

Parallel TTS web demo based on Flask + Vue (Vuetify).

Atomicoo 34 Dec 16, 2022
A tool for the game Politics And War. Saving players hours if searching for targets they can engage with.

A tool for the game Politics And War. Saving players hours if searching for targets they can engage with.

1 Dec 19, 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
Flask 文档中文翻译

Flask 中文文档 这里是 Flask 文档中文翻译项目,欢迎参与! 在开始翻译之前,请务必阅读下面的 Contributing Guide 了解贡献流程,然后阅读这个 Issue 了解翻译要求,在这个 Discussion 投票选出你认为合适的翻译词汇,在这个 Discussion 投票选出你喜

Grey Li 93 Nov 28, 2022
A Microsub server built with Python Flask and SQLite.

Microsub Server This repository contains the code that powers my personal Microsub server. Microsub is an IndieWeb specification currently in developm

jamesg 8 Oct 26, 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 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
An flask app for fake image detector

fake_img_detector This is a ml based project: frameworks used:- Flask Google collab #Description: Here you can Upload two different looking image with

shivam kumar 7 Jun 29, 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