Flask pre-setup architecture. This can be used in any flask project for a faster and better project code structure.

Overview

Flask-Architecture

This project has required python packages that's use in any flask normal or big project setup.

Files and folder structure are easy to use and configurable.


Root file of this project begin with application file.

  1. application.py

This file contains initialization for extensions with flask instance and flask object setup for run project with environment, host and port settings. There is AppSetting folder in this have extension, configuration and response file.

  1. extension.py

Extensions file have all objects of required libraries and we can use these in our project apps and initialize these with flask object in application file.

  1. configuration.py

Configuration file have flask app config variables that need to config with flask object.

  1. response.py

Response file have common api response model enum.


App Structure

We already created app for you AuthApp. Use this for user related staff. In this project structure we create apps like and create files with same names like AuthApp. App have 5 files app, models, query, router and schema.

  1. app.py

This file contains flask blueprint object and flask restx namespace object. Blueprint object and Namespace object initialize and add with flask object and rest api object that's imported from extension file. We use this namespace object to create our routes.

  1. router.py

This file is for create api using our namespace object.

  1. models.py

Model file containing database model. In this we are using db object from extension file.

  1. schema.py

Schema file work with marshmallow and database models. It's used to convert data types.

  1. query.py

Query file use for create separate methods for CRUD operations on models.


On root have a .env file that's have your project details like host, port, environment settings and also having secret key, database schema url. We just need to enter our details in this file according to variables.


Setup this project on your local follow these steps.

  1. Create a virtual environment.
  2. Activate created virtual environment.
  3. Install all required python packages from requirements.txt file.
  4. Update your .env file with your database url, server host & port, secret key, runtime environment.

Now we can run our server.

Run flask server flask run

Flask database migrations steps

  1. Initialize db migration flask db init.
  2. Migrate models to database flask db migrate -m " " .
  3. To upgrade changes flask db upgrade.
  4. To downgrade changes flask db downgrade.

Owner
Ajay kumar sharma
Hi, Well I am a Software Developer with good experience in Python and JQuery. I love to develop projects in Django, Flask, Fast API, and Angular.
Ajay kumar sharma
Rate Limiting extension for Flask

Flask-Limiter Flask-Limiter provides rate limiting features to flask routes. It has support for a configurable backend for storage with current implem

Ali-Akber Saifee 922 Jan 08, 2023
A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages.

smescan A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages. Development Process Step 0: Clone

Abu Hurayra 1 Jan 30, 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
Flask Apps - Open-Source And Paid | AppSeed

Flask Apps Open-Source web apps built with automation tools, HTML parsing and boilerplated code in Flask - - Provided by AppSeed App Generator. What i

App Generator 120 Oct 04, 2022
An Instagram Clone using Flask, Python, Redux, Thunk, React

An Instagram Clone using Flask, Python, Redux, Thunk, React

1 Dec 09, 2021
Flask-template - A simple template for make an flask api

flask-template By GaGoU :3 a simple template for make an flask api notes: you ca

GaGoU 2 Feb 17, 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
API to get the details of the characters in the Money heist TV show.

Project Heist Description: Project Heist is a RESTful API made using Python and Flask. This API is inspired by the popular Spanish TV show Money Heist

Rahul V 5 Dec 19, 2022
Flask Multiple Database Login

Flask Multiple Database Login Handle login with flask using two diferent databases: UE | European; BR | Brazilian; These databases are separed to resp

Jose Pedro 1 Dec 16, 2021
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
Flask Project Template A full feature Flask project template.

Flask Project Template A full feature Flask project template. See also Python-Project-Template for a lean, low dependency Python app. HOW TO USE THIS

Bruno Rocha 96 Dec 23, 2022
Library books management program, built with Flask, Python

Library books management program, With many features and good User Interface. built with Flask, Python. (Include Screenshots) and documentation on how to run it! Thank you :)

Thierry Mugisha 1 May 03, 2022
Sample Dockerized flask app deployed on Kubernetes on Azure using AKS

Sample Dockerized flask app deployed on Kubernetes on Azure using AKS

Ahmed khémiri 22 Sep 08, 2021
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
Flask starter template for better structuring.

Flask Starter app Flask starter template for better structuring. use the starter plate step 1 : cloning this repo through git clone the repo git clone

Tirtharaj Sinha 1 Jul 26, 2022
Serve angular production application from python flask backend. Quick and Easy

Serve angular production application from python flask backend. Quick and Easy

mark 1 Dec 01, 2022
Guitar tabs web app for guitar fans, powered by Python/Flask

Guitar123 version 0.8.5 Guitar tabs web app for guitar fans, powered by Python/Flask Features Guitar tabs search and browse Easy to use for end user a

lowrain 48 Dec 27, 2022
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 template themes for phyton flask website

Flask Phyton Web template A template themes for phyton flask website

Mesin Kasir 2 Nov 29, 2021
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