Description
The base code structure for restful Flask-RESTX framework
Flask-RESTX-boilerplate alternatives and similar packages
Based on the "Flask" category.
Alternatively, view Flask-RESTX-boilerplate alternatives based on common mentions on social networks and blogs.
-
flask-restful
Simple framework for creating REST APIs -
flasgger
Easy OpenAPI specs and Swagger UI for your Flask API -
Flask RestPlus
Fully featured framework for fast, easy and documented API development with Flask -
pycord
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API -
flask-restless
NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models. -
apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification).. -
nextcord
A Python wrapper for the Discord API forked from discord.py -
Flask Google Maps
Easy way to add GoogleMaps to Flask applications. maintainer: @getcake -
PEP 8 Speaks
A GitHub :octocat: app to automatically review Python code style over Pull Requests -
flask_for_startups
Flask boilerplate using a services oriented structure -
Flask-Diamond
:gem: Flask-Diamond is a batteries-included Flask framework. -
appkernel
API development made easy: a smart Python 3 API framework -
Flask Apps
Flask Apps - Open-Source And Paid | AppSeed -
discord-interactions-python
Useful tools for building interactions in Python -
Flask Paper Kit
Flask Boilerplate - Paper Kit Design | AppSeed -
#<Sawyer::Resource:0x00007f160f191eb0>
Python package for webscraping in Natural language -
Cilantropy
:four_leaf_clover: Cilantropy is a Python Package Manager interface created to provide an "easy-to-use" visual and also a command-line interface for Pythonistas. Works great on windows, linux, macos :star: -
flask-api-utils
Flask extension that takes care of API representation and authentication. -
flask-ripozo
A python package for integrating ripozo with Flask -
Flask-FileAlchemy
YAML-formatted plain-text file based models for Flask backed by Flask-SQLAlchemy -
Burrowkv
Burrowkv is a simple key-value store implementation in Python -
Apprentice
Built for streamlining development of Google Assistant Actions -
Flask Transit
Flask App - Transit design by Pixelarity | AppSeed -
discord.py
An API wrapper for Discord written in Python.
Write Clean Python Code. Always.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Flask-RESTX-boilerplate or a related project?
README
Flask-RESTX-boilerplate
The base code structure for Flask-RESTX
If you like this project, feel fee to leave a few words of appreciation here or buy me a pizza
Table of contents
Directory Convention
/app
/app/manage.py
- The entry point of the code
/app/config.py
- Store configuration from env variables
/app/modules
Flask-RESTX provides a way to use Flask’s blueprint. The main idea is to split your app into reusable namespaces. Here namespaces are organized in different modules
/app/modules/sample_mod: each module is split into MVC, i.e. controller, dto, view
- /app/modules/sample_controller.py
- /app/modules/sample_dto.py
- /app/modules/sample_view.py
/app/modules/sample_mod/datadef: validation layer
app/extensions
we put everything else here, i.e. interfaces, cache, databases, ORM, i18n, monitor, logging, etc.
/docker
- All related docker files
/sql
- sql migration files
/test
- unit test directory
/docs
- Store documents files
Development instruction
Running service with docker
$ docker build -f ./docker/app/Dockerfile .
$ docker run <name of image> -p 5000:5000
- Swagger is at /api/v1/openapi
Recommended code contribution and submission
The live branch should be named master or main
The main feature branch is named dev where development is branched out from dev
$ git checkout -b dev origin/dev
$ git checkout -b <your branch name> dev
# do your development
$ git add --all
$ git commit -s -am "your message"
# You might also need to rebase from upstream remote branch before pushing
$ git rebase upstream/dev
# Save new packages to app/requirements
$ pip3 freeze > <path to project>/app/requirements.txt
# To push your branch
$ git push -u origin <your branch name>
- Then you can create MR with the source branch is your branch and the target branch is dev.
- When we release, we merge dev into master, tag them and deploy.
Test and Code quality
Unit test
$ pytest tests
Code quality
$ pylint ./app
$ mypy ./app
$ black ./tests
- API design: guide
- Code style: Pep8 coding style
- import statement: better to import only necessary function not entire package, i.e. if you only need sqrt():
bash Recommended: from math import sqrt Not recommended: import math
- Exception - EAFP principle: use except/try instead of if/else, and try to use specific exceptions instead of generic exception.
Versioning
We use SemVer for versioning. Please see CHANGELOG.md for more details.