From 85b07e0fe158e2c1065b324c55108ff305079a2f Mon Sep 17 00:00:00 2001 From: Hugo Camino Date: Thu, 22 Nov 2018 15:03:17 +0100 Subject: [PATCH] Documentation moved and updated from the project that uses the library. --- README.md | 21 +++++++++++++++++++++ pyms/config/confile.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d21812c..95da07d 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,24 @@ ```bash pip install py-ms ``` + +## Structure + +### pyms/config +Module to read yaml or json configuration from a dictionary or a path. + +### pyms/flask/app +With the funcion `create_app` initialize the Flask app, register [blueprints](http://flask.pocoo.org/docs/0.12/blueprints/) +and intialize all libraries like Swagger, database, trace system, custom logger format, etc. + +### pyms/flask/healthcheck +This views is usually used by Kubernetes, Eureka and other systems to check if our application is up and running. + +### pyms/logger +Print logger in JSON format to send to server like Elasticsearch. Inject span traces in logger. + +### pyms/rest_template +Encapsulate common rest operations between business services propagating trace headers if configured. + +### pyms/tracer +Create an injector `flask_opentracing.FlaskTracer` to use in our projects diff --git a/pyms/config/confile.py b/pyms/config/confile.py index 5fbf9f4..0935584 100644 --- a/pyms/config/confile.py +++ b/pyms/config/confile.py @@ -1,4 +1,4 @@ -"""Module to read yaml conf""" +"""Module to read yaml or json conf""" import logging import os