Skip to content

🗼 An "optionally opinionated and structured" flask boilerplate application for jump-starting microservice development with flask

License

Notifications You must be signed in to change notification settings

pritam001/pyflask-microservice-base

Repository files navigation

pyflask-microservice-base

An "optionally opinionated and structured" flask boilerplate microservice for jump-starting development

Built with Python Flask License

Project status

Version Maintainability codecov

Tools

Min Python Version 3.7 Min GNU Make Version 4.3 Code style: black Static Analysis: flake8 Cyclomatic Complexity: radon Imports: isort Static Typing: mypy Security: bandit pre-commit API Specs Tests: pytest Coverage: pytest-cov Version Handling: tbump

Usage Guide

This is a template project hosted on GitHub which can be used to create new repositories.

Steps for creating boilerplate project in GitHub

  1. Create a new repository named "my-pyflask-project" using this template repository *+
  2. git clone https://www.github.com/username/my-pyflask-project.git
  3. cd my-pyflask-project
  4. make init : Initialize and personalize project
  5. make setup : Use pip-tools, pip-compile, pip install to set up python packages
  6. make upgrade : Upgrade dependencies to latest version
  7. make pre-commit : Run format, lint, test and cover
  8. Run git add . and git commit -m "Personalize service"

*+ GitHub Guide: Creating a repository from a template
*^ Guide to Conda environment

Make Guide

Type make help for available commands

Type make pre-commit before committing your changes to run formatters, linters, tests and code coverage collectors

Linting Guide

make format : Format and fix python code with black, isort, autoflake and pre-commit hooks

make lint : Run static analysis with flake8, radon, mypy and bandit

Documentation

Flasgger docs can be found at http://0.0.0.0:8420/api/v1/pyflask-microservice/swagger

API specs can be found at http://0.0.0.0:8420/api/v1/pyflask-microservice/swagger_spec

Flasgger UI version: v2 | OpenAPI version: 2

Contributing

  1. Stargaze this repository
  2. Fork this repository
  3. Add this project as upstream
  4. Commit your changes
  5. Create pull request to upstream/development branch

Roadmap

  • Swagger support
  • Introduction of testing tools
  • Code coverage
  • Version handling by tbump
  • Personalization script
  • Docker support
  • uwsgi server
  • Add CoC, Contribution guidelines, PR and issue templates
  • Update linting documentation
  • Testing tools documentation