FlaskStarter

pyflask-microservice-base — Flask Starter Template

By pritam001

A Flask-based microservice starter template that provides an optional directory structure and Make command set for quickly creating new projects with Swagger documentation, code linting, and test configuration.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided preview

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-03View source

What stands out

A quick read of the recorded project description.

01

Create new projects as a GitHub template repository and complete initialization and personalization via make init

02

Makefile wraps common development commands such as setup, upgrade, pre-commit, format, and lint

03

Integrates black, isort, autoflake, flake8, radon, mypy, bandit, and pre-commit code quality tools

04

Runs tests and collects coverage using pytest and pytest-cov

05

Provides Swagger UI and the Swagger spec via Flasgger, default port 8420

06

Handles version numbers using tbump

Template Details

pyflask-microservice-base is a Flask microservice boilerplate project hosted on GitHub, positioned as an "optionally opinionated and structured" starter. It is not itself a runnable business service; instead, you copy a new project repository via GitHub's template repository feature, then run initialization and dependency installation commands to generate a personalized project.

The template organizes the development workflow around a Makefile: make init initializes and personalizes the project, make setup installs Python dependencies using pip-tools and pip-compile, make upgrade upgrades dependencies, and make pre-commit runs formatting, static checks, tests, and coverage collection in sequence. The code quality toolchain includes black, isort, autoflake, flake8, radon, mypy, bandit, and pre-commit; testing uses pytest and pytest-cov; version management uses tbump. API documentation is based on Flasgger, serving Swagger UI and the Swagger spec by default on local port 8420, with Flasgger UI version v2 and OpenAPI version 2.

The project requires Python 3.7 or later and GNU Make 4.3 or later. The README roadmap shows that Swagger support, testing tools, code coverage, and tbump version management are complete, while the personalization script, Docker support, uwsgi server, code of conduct and contributing guide, PR and issue templates, and lint and test tool documentation are still marked as incomplete. Therefore, this template is suitable as a starting point for internal microservice projects, but you should not assume it already includes containerization or production server configuration.

FlaskStarter

Is it right for your project?

Use Cases

  • Create a new Flask microservice repository from this template on GitHub and start development
  • Establish a unified entry point for formatting, static checks, and test commands for a team's microservice project
  • View and debug API documentation via Flasgger during development
  • Write and run tests for service endpoints using pytest and pytest-cov

Suitable For

  • Python developers who need a Flask microservice starter structure
  • Teams that want to unify formatting, linting, and testing workflows with Make commands
  • Flask projects that need Swagger/OpenAPI documentation capabilities
  • Users who accept the Python 3.7+ and GNU Make 4.3+ environment constraints

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Create a new repository from this repository as a template on GitHub, then clone it locally

  2. 2

    Run make init, make setup, and make upgrade in sequence to complete initialization and dependency installation

  3. 3

    Run make pre-commit before committing to perform formatting, static checks, tests, and coverage collection

  4. 4

    Local API documentation is by default at http://0.0.0.0:8420/api/v1/pyflask-microservice/swagger

  5. 5

    The personalization script, Docker support, and uwsgi server in the README roadmap are not yet complete; evaluate them yourself

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version of the public repository under the MIT license; the free scope is the code of this version and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercialize, and distribute the code of this version for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
  • This project is a GitHub template repository and must be used by creating a new repository via GitHub's template feature, not by cloning and running it directly.
  • Before use, you must create a new repository from this repository as a template on GitHub; it cannot be run directly as a standalone project.
  • You need to run make init to complete initialization and personalization; the template itself is not a directly runnable business service.
  • Requires a Python 3.7 or later environment.
  • Requires GNU Make 4.3 or later; the development workflow depends on Makefile commands.
  • Docker support in the roadmap is not yet complete; you should not assume the template already includes containerization configuration.
  • The uwsgi server in the roadmap is not yet complete; you should not assume production server configuration is already available.
  • The personalization script in the roadmap is not yet complete; the initialization and personalization process may be incomplete.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

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

Original README

1. Create a new repository named "my-pyflask-project" using this template repository *+

Original README

1. `make init` : Initialize and personalize project

Original README

[![Min Python Version 3.7](https://img.shields.io/badge/python-3.7+-3776AB.svg?style=flat)](https://www.python.org/download/releases/3.8.0/)

Original README

[![Min GNU Make Version 4.3](https://img.shields.io/badge/make-4.3+-222222.svg?style=flat)](https://www.gnu.org/software/make/manual/make.html)

Original README

- [ ] Docker support

Original README

- [ ] uwsgi server

Original README

- [ ] Personalization script

Original README
https://github.com/pritam001/pyflask-microservice-base/blob/master/LICENSEhttps://github.com/pritam001/pyflask-microservice-base/blob/master/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-04. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
Partly documented · 56 / 100
Technologies
Flask
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2022-07-29
Screenshot last checked
2026-10-04

No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.

The catalog identifies Flask as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-05

Inspect the recorded source material

SHA-256: 12877dca8e43543bde72eb624ff18d0228fcd88a72c3044e7dc9bcad2cd7bb5a

2026-10-04T23:05:24.762Z

Source file / repository
[//]: <> (pyflask_config: service_name)
pyflask-microservice-base
------------------------------------------------------------------------------
An "optionally opinionated and structured" flask boilerplate microservice for jump-starting development

![Built with](https://img.shields.io/badge/-Built%20with-073551?style=flat-square)
![Python](https://img.shields.io/badge/-Python-3776AB?style=flat-square&logo=Python&logoColor=white)
![Flask](https://img.shields.io/badge/-Flask-000000?style=flat-square&logo=flask&logoColor=white)
![License](https://img.shields.io/github/license/pritam001/pyflask-microservice-base?style=flat-square&label=License)


Project status
------------------------------------------------------------------------------
![Version](https://img.shields.io/github/v/tag/pritam001/pyflask-microservice-base?logo=codesandbox)
[![Maintainability](https://api.codeclimate.com/v1/badges/cc34f11b1a2b9bb8e216/maintainability)](https://codeclimate.com/github/pritam001/pyflask-microservice-base/maintainability)
[![codecov](https://codecov.io/gh/pritam001/pyflask-microservice-base/branch/master/graph/badge.svg)](https://codecov.io/gh/pritam001/pyflask-microservice-base)


Tools
------------------------------------------------------------------------------
[![Min Python Version 3.7](https://img.shields.io/badge/python-3.7+-3776AB.svg?style=flat)](https://www.python.org/download/releases/3.8.0/)
[![Min GNU Make Version 4.3](https://img.shields.io/badge/make-4.3+-222222.svg?style=flat)](https://www.gnu.org/software/make/manual/make.html)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat)](https://github.com/psf/black)
[![Static Analysis: flake8](https://img.shields.io/badge/static%20analysis-flake8-cccccc.svg?style=flat)](https://github.com/PyCQA/flake8/)
[![Cyclomatic Complexity: radon](https://img.shields.io/badge/cyclomatic%20complexity-radon-ff5252.svg?style=flat)](https://github.com/rubik/radon)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://timothycrosley.github.io/isort/)
[![Static Typing: mypy](https://img.shields.io/badge/static%20typing-mypy-blue.svg?style=flat)](https://github.com/python/mypy/)
[![Security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg?style=flat)](https://github.com/PyCQA/bandit)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![API Specs](https://img.shields.io/badge/specs-flasgger-6D9A00?style=flat&logo=swagger&logoColor=white)](https://github.com/flasgger/flasgger)
[![Tests: pytest](https://img.shields.io/badge/%20tests-pytest-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)
[![Coverage: pytest-cov](https://img.shields.io/badge/%20coverage-pytest--cov-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)
[![Version Handling: tbump](https://img.shields.io/badge/%20version%20handling-tbump-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)


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 *+
1. `git clone https://www.github.com/username/my-pyflask-project.git`
1. `cd my-pyflask-project`
1. `make init` : Initialize and personalize project
1. `make setup` : Use pip-tools, pip-compile, pip install to set up python packages
1. `make upgrade` : Upgrade dependencies to latest version
1. `make pre-commit` : Run format, lint, test and cover
1. Run `git add .` and `git commit -m "Personalize service"`

*+ [GitHub Guide: Creating a repository from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)
<br>
*^ [Guide to Conda environment](https://github.com/pritam001/pyflask-microservice-base/blob/master/documentation/wiki/conda.md)


### Make Guide
Type `make help` for available commands

<p align="center"><img src="documentation/assets/make-help.gif" /></p>

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

<p align="center"><img src="documentation/assets/make-pre-commit.gif" /></p>


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

<p align="center"><img src="documentation/assets/make-format.gif" /></p>

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

<p align="center"><img src="documentation/assets/make-lint.gif" /></p>


### Documentation
[//]: <> (pyflask_config: service_name)
Flasgger docs can be found at http://0.0.0.0:8420/api/v1/pyflask-microservice/swagger

[//]: <> (pyflask_config: service_name)
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

<p align="center"><img src="documentation/assets/flasgger_intro.png" /></p>


Contributing
------------------------------------------------------------------------------
1. Stargaze this repository
1. Fork this repository
1. Add this project as `upstream`
1. Commit your changes
1. Create pull request to `upstream/development` branch

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

Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.

flask-boilerplate

flask-boilerplate

A Flask starter template from Real Python, preconfigured with Flask-SQLAlchemy, Flask-WTF, Fabric, Coverage, and a Bootstrap frontend. It includes organized templates for errors, forms, layouts, and pages, plus static assets and README deployment instructions for Heroku and PythonAnywhere.

Flask · Starter

TRMNL-Boilerplate

TRMNL-Boilerplate

A Flask starter template for TRMNL e-ink display plugins, offering webhook endpoints with CORS, display generation, caching, configuration management, and pytest tests.

Flask · Starter

openai-flask-starter

openai-flask-starter

A Flask-based chatbot starter that calls the OpenAI chat completion API, with an HTML interface, .env.sample for the API key and HTTP_PORT, and Dockerfile/docker-compose for containerized runs.

Flask · Starter

app-engine-starter

app-engine-starter

A Flask starter template for Google App Engine standard environment, using Python 3, with a Bootstrap page skeleton, Jinja2 semi-automated navigation, pipenv local development, and gcloud deployment instructions.

Flask · Starter

flask-account-starter

flask-account-starter

A Flask account system starter template using the application factory pattern, with built-in registration, toggleable account verification, password reset, new IP login verification, failed login lockout, activity logs, and automated emails.

Flask · Starter

Py-Flask-Starter

Py-Flask-Starter

Py-Flask-Starter is an MIT-licensed starter template for Python Flask applications, maintained by MartMbithi. The README outlines a virtualenv-based setup and installs flask, mysql-connector-python, flask-mysqldb, flask-wtf, and passlib, indicating MySQL connectivity, WTForms forms, and password hashing as intended needs.

Flask · Starter