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
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
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
Flask webassets integration.

Integrates the webassets library with Flask, adding support for merging, minifying and compiling CSS and Javascript files. Documentation: https://flas

Michael Elsdörfer 433 Dec 29, 2022
Flask 文档中文翻译

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

Grey Li 93 Nov 28, 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
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 team blog based on Flask

A team blog based on Flask This project isn't supported at the moment, please see a newer pypress-tornado Thanks for flask_website and newsmeme at [ht

老秋 549 Nov 10, 2022
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 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
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
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 extension for integration with the awesome pydantic package

Flask-Pydantic Flask extension for integration of the awesome pydantic package with Flask. Installation python3 -m pip install Flask-Pydantic Basics U

248 Dec 26, 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
Burp-UI is a web-ui for burp backup written in python with Flask and jQuery/Bootstrap

Burp-UI Contents Introduction Screenshots Demo What's that? Who are you? Documentation FAQ Community Notes See also Licenses Thanks Introduction Scree

Benjamin 84 Dec 20, 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
A Flask wrapper of Starknet state. Similar in purpose to Ganache.

Introduction A Flask wrapper of Starknet state. Similar in purpose to Ganache. Aims to mimic Starknet's Alpha testnet, but with simplified functionali

Shard Labs 159 Jan 04, 2023
Small and simple gravatar usage in Flask.

Flask Gravatar About This is small and simple integration gravatar into flask. Installation Flask-Gravatar is on PyPI so all you need is: pip install

Alexander Zelenyak 78 Sep 15, 2022
A Flask application for Subdomain Enumeration

subdomainer-flask A Flask application for Subdomain Enumeration steps to be done git clone https://github.com/gokulapap/subdomainer-flask pip3 install

GOKUL A.P 7 Sep 22, 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
A simple barcode and QR code generator built in Python with Flask.

✨ Komi - Barcode & QR Generator ✨ A simple barcode and QR code generator built in Python with Flask. 📑 Table of Contents Usage Installation Contribut

Bonnie Fave 2 Nov 04, 2021