/microservices-scaffold

Barebone Python Microservices with Flask

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

microservices-scaffold

Python package Build Status Coverage Status Requirements Status Updates Python 3

Python Microservice Scaffold is an example of how to structure a Flask Microservice Project. This Scaffold is build over PyMS package. PyMS is a Microservice chassis pattern like Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build microservices with Python which handles cross-cutting concerns:

  • Externalized configuration
  • Logging
  • Health checks
  • Metrics
  • Distributed tracing

Quickstart

We recommended use Poetry to install the dependencies

Start with poetry

pip install --user poetry
poetry update
poetry run python manage.py

Start with a virtualenv

pip install -r requirements.txt
python manage.py

Open http://127.0.0.1:5000/ui/ and play with swagger

See our quickstart webpage

Dependencies

Updated dependencies in a requirements.txt with:

poetry export --dev -f requirements.txt --output requirements.txt

How To contribute

We appreciate opening issues and pull requests to make PyMS even more stable & useful! See This doc for more details