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.
8.6 1.6 L3 Flask-RESTX-boilerplate VS flask-restfulSimple framework for creating REST APIs
7.2 1.0 L3 Flask-RESTX-boilerplate VS flasggerEasy OpenAPI specs and Swagger UI for your Flask API
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
A Python wrapper for the Discord API forked from discord.py
4.4 0.0 L4 Flask-RESTX-boilerplate VS Flask Google MapsEasy way to add GoogleMaps to Flask applications. maintainer: @getcake
2.2 0.0 L5 Flask-RESTX-boilerplate VS Flask-Diamond:gem: Flask-Diamond is a batteries-included Flask framework.
API development made easy: a smart Python 3 API framework
Useful tools for building interactions in Python
0.8 0.0 L5 Flask-RESTX-boilerplate VS flask-ripozoA python package for integrating ripozo with Flask
* 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?
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
- The entry point of the code
- Store configuration from env variables
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_mod/datadef: validation layer
we put everything else here, i.e. interfaces, cache, databases, ORM, i18n, monitor, logging, etc.
- All related docker files
- sql migration files
- unit test directory
- Store documents files
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
$ pytest tests
$ 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.
We use SemVer for versioning. Please see CHANGELOG.md for more details.