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
REST API built using flask framework that used for managing bookmarks by individual users.

Bookmarks REST API REST API built using flask framework that used for managing bookmarks by individual users. API Consumers Note This app is built usi

Venkatesh Tantravahi 1 Dec 27, 2021
A caching extension for Flask

Flask-Caching Adds easy cache support to Flask. This is a fork of the Flask-Cache extension. Flask-Caching also includes the cache module from werkzeu

Peter Justin 774 Jan 02, 2023
: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
Freezes a Flask application into a set of static files.

Frozen-Flask Freezes a Flask application into a set of static files. The result can be hosted without any server-side software other than a traditiona

Frozen Flask 737 Dec 19, 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
PatientDB is a flask app to store patient information.

PatientDB PatientDB on Heroku "PatientDB is a simple web app that stores patient information, able to edit the information, and able to query the data

rbb 2 Jan 31, 2022
A boilerplate Flask API for a Fullstack Project :rocket:

Flask Boilerplate to quickly get started with production grade flask application with some additional packages and configuration prebuilt.

Yasser Tahiri 32 Dec 24, 2022
An python flask app with webserver example

python-flask-example-keepalive How it works? Basically its just a python flask webserver which can be used to keep any repl/herokuapp or any other ser

KangersHub 2 Sep 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
Flask-app scaffold, generate flask restful backend

Flask-app scaffold, generate flask restful backend

jacksmile 1 Nov 24, 2021
Search users in Github. Created with Flask, PipEnv, Heroku and free time.

Search in Github Here search for users in Github and other stuff! This app is working with, Data Github API BackEnd Flask Language Python Package mana

AmirHossein Mohammadi 12 Jan 16, 2022
Flask + marshmallow for beautiful APIs

Flask-Marshmallow Flask + marshmallow for beautiful APIs Flask-Marshmallow is a thin integration layer for Flask (a Python web framework) and marshmal

marshmallow-code 770 Jan 05, 2023
Python web-app (Flask) to browse Tandoor recipes on the local network

RecipeBook - Tandoor Python web-app (Flask) to browse Tandoor recipes on the local network. Designed for use with E-Ink screens. For a version that wo

5 Oct 02, 2022
A clean and simple blog system based on Flask and MongoDB

CleanBlog A clean and simple blog system based on Flask and MongoDB You can access CleanBlog This is the source code of Flask Tutorial Pro,you can buy

shin 107 Oct 06, 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
SQLAlchemy database migrations for Flask applications using Alembic

Flask-Migrate Flask-Migrate is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. The database operations

Miguel Grinberg 2.2k Dec 28, 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
Flask Application Structure with MongoDB

This application aims to serve as a template for APIs that intend to use mongoengine and flask-restx

Tiago Franco 5 Jun 25, 2022
MongoEngine flask extension with WTF model forms support

Flask-MongoEngine Info: MongoEngine for Flask web applications. Repository: https://github.com/MongoEngine/flask-mongoengine About Flask-MongoEngine i

MongoEngine 815 Jan 03, 2023
Analytics snippets generator extension for the Flask framework.

Flask-Analytics Flask Analytics is an extension for Flask which generates analytics snippets for inclusion in templates. Installation $ pip install Fl

Mihir 80 Nov 30, 2022