Releases: python-microservices/pyms
v2.3.0
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
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
v2.2.0
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 firstpip 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 likeConfig 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
toConfFile
fromMicroservice
class to set path from code if you want to not useCONFIGMAP_FILE
from env
Refactors
- Refactor config. Memoize of files moved to new class
v2.1.0
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
v2.0.0rc1
v1.5.0
New functionalities:
- Memoizes config file per service
- Updates dependencies
- Created metrics as a service
# 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
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