Examples

pip install py-ms

config.yml:

my-minimal-microservice:
  APP_NAME: "Python Microservice"

main.py

from flask import jsonify

from pyms.flask.app import Microservice

ms = Microservice(service="my-minimal-microservice", path=__file__)
app = ms.create_app()


@app.route("/")
def example():
    return jsonify({"main": "hello world"})


if __name__ == '__main__':
    app.run()
python main.py

Open in your browser http://localhost:5000/

See this Github page to see a examples