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

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

79 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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

WIP Maintainability codecov

Tools

Min Python Version 3.8+ 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. Create and activate conda environment conda init my-conda-venv conda activate my-conda-venv *^
  5. make setup : Use pip-tools, pip-compile, pip install to setup python packages

*+ 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-service/swagger

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

Flasgger UI version: v2 | OpenAPI version: 2

Development Setup

To be updated

Contributing

  1. Stargaze this repository
  2. Fork this repository
  3. Commit your changes
  4. Create pull request to development branch

TODO

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