Skip to content

Releases: python-microservices/pyms

v2.3.0

08 Mar 19:35
Compare
Choose a tag to compare

Features
Installing pyms with all dependencies

pip install pyms[all]
  • Installing minimun dependencies
pip install pyms
  • Installing request dependencies
pip install pyms[request]
  • Installing swagger dependencies
pip install pyms[swagger]
  • Installing metrics dependencies
pip install pyms[metrics]
  • Installing trace dependencies
pip install pyms[trace]
  • Installing cryptography dependencies
pip install pyms[cryptography]

v2.3.0rc1

07 Mar 20:58
Compare
Choose a tag to compare
v2.3.0rc1 Pre-release
Pre-release

Features
Installing pyms with all dependencies

pip install pyms[all]
  • Installing minimun dependencies
pip install pyms
  • Installing request dependencies
pip install pyms[request]
  • Installing swagger dependencies
pip install pyms[swagger]
  • Installing metrics dependencies
pip install pyms[metrics]
  • Installing trace dependencies
pip install pyms[trace]
  • Installing cryptography dependencies
pip install pyms[cryptography]

v2.2.2

28 Feb 20:28
Compare
Choose a tag to compare

Fixes

  • If you set a config file from env, but exists a default file. PyMS load the default file first instead the env fi
  • Fix packages included in python setup.py sdist bdist_wheel

v2.2.0

25 Feb 19:05
Compare
Choose a tag to compare

Features

  • Create project from scaffold #90
    PyMS has a command line option to create a project template like Microservices Scaffold.
    This command use cookiecutter to download and install this template
    [Warning] You must run first pip install cookiecutter==1.7.0

    pyms startproject

    this output a lot of options step by step:

    project_repo_url [https://github.com/python-microservices/microservices-scaffold]: 
    project_name [Python Microservices Boilerplate]: example project
    project_folder [example_project]: 
    project_short_description [Python Boilerplate contains all the boilerplate you need to create a Python package.]: 
    create_model_class [y]: 
    microservice_with_swagger_and_connexion [y]: 
    microservice_with_traces [y]: 
    microservice_with_metrics [y]: 
    application_root [/example_project]: 
    Select open_source_license:
    1 - MIT license
    2 - BSD license
    3 - ISC license
    4 - Apache Software License 2.0
    5 - GNU General Public License v3
    6 - Not open source
    Choose from 1, 2, 3, 4, 5, 6 [1]: 

    When you finish to introduce the options, a project will be created in [project_folder] folder

  • Encrypt/decrypt config (#86)

    • New encryption and decryption feature with AES
    • Create a key to encrypt config with new command line pyms create-key
    • Encrypt a string with the new command line pyms encrypt [STRING]
    • Set the key file with new environment variable KEY_FILE
    • If you set in your config a var with the prefix "ENC_" or "enc_" PyMS search for the key file and decrypt the string. Now you can encrypt your database url for production environments. I.E.:
    pyms:
    [...]
    config:
    ENC_DATABASE: gAAAAABeSZ714r99iRIxhoH77vTdRJ0iqSymShfqgGN9PJveqhQWmshRDuV2a8sATey8_lHkln0TwezczucH-aJHGP_LyEiPxwM-88clNa7FB1u4g7Iaw3A=

    you can access it in your code with current_app.config["DATABASE"] == "http://database-url"

  • Human readable config errors #85
    Show more help information if the config file not have a good structure with error messages like

    Config file must start with `pyms` keyword, for example:
    pyms:
      services:
      metrics: true
      requests:
      data: data
      swagger:
      path: ""
      file: "swagger.yaml"
      tracer:
      client: "jaeger"
      host: "localhost"
      component_name: "Python Microservice"
      config:
      DEBUG: true
      TESTING: true
    
  • Add service name label by default #84 - @alexppg
    It adds a label to all jaeger's generated metrics that can be used to identify every microservice.
    See jaegertracing/jaeger-client-python#269.
    I messed up the previous PR, it's the same as this. #72

Fixes

  • Send path to ConfFile from Microservice class to set path from code if you want to not use CONFIGMAP_FILE from env

Refactors

  • Refactor config. Memoize of files moved to new class

v2.1.0

22 Jan 17:12
Compare
Choose a tag to compare

Features

  • Refactor config:
    • Memoize config file to prevent open each time access to the configuration
    • Removed "uppercase" parameter, created to_flask() method to uppercase attrs to create Flask config
  • Reload config from file. First step to solve the issue #71
  • Reload services and app when the configuration was reloaded with Microservice.reload() method. First step to solve the issue #71

Fix

  • Removed memoize of service. This feature create an error on tests when create a instance of Microservice out of tests

v2.0.0

12 Jan 20:12
Compare
Choose a tag to compare

Features

  • Refactor config. Issue #75 (#78)
  • Added RestyResolver to connexion, issue #39 (#74)
  • Set swagger url by config file (#73)

Fix

  • Fix tracers and logging Working outside of application context (#76)
  • Fix pylint not executed in service folder (#69)
  • Updated tox and dependencies (#77)

v2.0.0rc1

16 Dec 15:28
Compare
Choose a tag to compare
v2.0.0rc1 Pre-release
Pre-release

Features

  • Refactor config. Issue #75 (#78)
  • Added RestyResolver to connexion, issue #39 (#74)
  • Set swagger url by config file (#73)

Fix

  • Fix tracers and logging Working outside of application context (#76)
  • Fix pylint not executed in service folder (#69)
  • Updated tox and dependencies (#77)

v1.5.0

01 Dec 21:09
Compare
Choose a tag to compare

New functionalities:

# HELP flask_request_latency_seconds Flask Request Latency
# TYPE flask_request_latency_seconds histogram
flask_request_latency_seconds_bucket{endpoint="/",le="0.005",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.01",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.025",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.05",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.075",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.1",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.25",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.5",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="0.75",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="1.0",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="2.5",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="5.0",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="7.5",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="10.0",method="GET"} 1.0
flask_request_latency_seconds_bucket{endpoint="/",le="+Inf",method="GET"} 1.0
flask_request_latency_seconds_count{endpoint="/",method="GET"} 1.0
flask_request_latency_seconds_sum{endpoint="/",method="GET"} 0.0004162788391113281
# TYPE flask_request_latency_seconds_created gauge
flask_request_latency_seconds_created{endpoint="/",method="GET"} 1.5748102803253472e+09
# HELP flask_request_count_total Flask Request Count
# TYPE flask_request_count_total counter
flask_request_count_total{endpoint="/",http_status="200",method="GET"} 1.0
# TYPE flask_request_count_created gauge
flask_request_count_created{endpoint="/",http_status="200",method="GET"} 1.5748102803254728e+09

# TYPE python_logging_messages_total counter
python_logging_messages_total{level="INFO",service="Python Microservice"} 1.0
# TYPE python_logging_messages_created gauge
python_logging_messages_created{level="INFO",service="Python Microservice"} 1.5748112738910015e+09

Bugs fixed:

  • backward compatible requests service. If we have the old way to init requests raise a exception like:
pyms:
  requests: true

v1.4.1

18 Nov 18:14
Compare
Choose a tag to compare

New functionalities:

  • Removed tracer from core
  • Created tracer as a service
  • Configure tracer between jaeger and lightstep from config.yml
  • Set tracer host from config.yml
  • Check if package is installed

Bugs fixed:

  • Fix Coveralls. Not push coverage since 07/2019
  • Fix error when swagger service not present in config.yml

v1.3.2

30 Oct 17:30
Compare
Choose a tag to compare
  • Changed logging messages to debug
  • Added pylint validation to CI