99[ ![ Documentation Status] ( https://readthedocs.org/projects/py-ms/badge/?version=latest )] ( https://py-ms.readthedocs.io/en/latest/?badge=latest )
1010[ ![ Gitter] ( https://img.shields.io/gitter/room/DAVFoundation/DAV-Contributors.svg )] ( https://gitter.im/python-microservices/pyms )
1111
12-
13- PyMS, Python MicroService, is a [ Microservice chassis pattern] ( https://microservices.io/patterns/microservice-chassis.html )
14- like Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build
15- microservices with Python which handles cross-cutting concerns:
12+ PyMS, Python MicroService, is a [ Microservice chassis pattern] ( https://microservices.io/patterns/microservice-chassis.html )
13+ like Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build
14+ microservices with Python which handles cross-cutting concerns:
1615
1716- Externalized configuration
1817- Logging
1918- Health checks
2019- Metrics
2120- Distributed tracing
2221
23- PyMS is powered by [ Flask] ( https://flask.palletsprojects.com/en/1.1.x/ ) , [ Connexion] ( https://github.com/zalando/connexion )
22+ PyMS is powered by [ Flask] ( https://flask.palletsprojects.com/en/1.1.x/ ) , [ Connexion] ( https://github.com/zalando/connexion )
2423and [ Opentracing] ( https://opentracing.io/ ) .
2524
2625Get started with [ Installation] ( ./docs/installation.md ) and then get an overview with the [ Quickstart] ( ./docs/quickstart.md ) .
2726
2827## Documentation
2928
30- To know how use, install or build a project see the [ docs] ( https://py-ms.readthedocs.io/en/latest/ ) .
29+ To know how to use, install or build a project see the [ docs] ( https://py-ms.readthedocs.io/en/latest/ ) .
3130
3231## Motivation
3332
34- When we started to create microservice with no idea, we were looking for tutorials, guides, best practices, but we found
33+ When we started creating a microservice with no idea, we were looking for tutorials, guides, best practices, but we found
3534nothing to create professional projects. Most articles say:
3635
3736- "Install flask"
3837- "Create routes"
3938- (Sometimes) "Create a swagger specs"
4039- "TA-DA! you have a microservice"
4140
42- But... what happens with our configuration out of code like Kubernetes configmap? what happens with transactionality?
41+ But... what happens with our configuration out of code like Kubernetes configmap? what happens with transactionality?
4342If we have many microservices, what happens with traces?.
4443
45- There are many problems around Python and microservices and we can` t find anyone to give a solution.
44+ There are many problems around Python and microservices and we can' t find anyone to give a solution.
4645
47- We start creating these projects to try to solve all the problems we have found in our professional lives about
46+ We start creating these projects to try to solve all the problems we have found in our professional lives about
4847microservices architecture.
4948
50- Nowadays, is not perfect and we have a looong roadmap, but we hope this library could help other fellas and friends ;)
49+ Nowadays, is not perfect and we have a looong roadmap, but we hope this library could help other fellas and friends ;)
5150
5251## Installation
5352
5453``` bash
5554pip install py-ms[all]
5655```
5756
58- # Quickstart
57+ ## Quickstart
5958
6059You need to create 2 files: main.py and config.yml:
6160
@@ -93,27 +92,27 @@ pyms:
9392 SECRET_KEY : " gjr39dkjn344_!67#"
9493` ` `
9594
96- ### So what did that code do?
95+ ## So what did that code do?
9796
98- 1. Create a instance of PyMS Microservice class (#1.1). This initialization inject the configuration defined in the
97+ 1. Create a instance of PyMS Microservice class (#1.1). This initialization injects the configuration defined in the
99981.3 block and could be accessed through current_app.config like typical
10099[Flask config](https://flask.palletsprojects.com/en/1.1.x/config/).
101100Then, initialize the service defined in the 1.2 block. See [Services](./docs/services.md) for more details.
102101
103- 2. Initialize [Flask](https://flask.palletsprojects.com/en/1.1.x/) instance, [Connexion](https://github.com/zalando/connexion)
102+ 2. Initialize a [Flask](https://flask.palletsprojects.com/en/1.1.x/) instance, [Connexion](https://github.com/zalando/connexion)
104103if it was defined in the pyms configuration block, create a tracer, add health-check blueprint, initialize libs and set
105- the PyMS Microservice in ` ms` attribute and you can access to it with `current_app.ms`.
104+ the PyMS Microservice in ` ms` attribute and you can access to it with `current_app.ms`.
106105This steps has their each functions and you can easy
107106override it.
108107
109- 3. `create_app` return the flask instance and you can interact with it as a typical flask app
108+ 3. `create_app` returns the flask instance which you can interact with as a typical flask app
110109
111110See [Documentation](https://py-ms.readthedocs.io/en/latest/) to learn more.
112111
113112# # Create a project from scaffold
114113
115114PyMS has a command line option to create a project template like [Microservices Scaffold](https://github.com/python-microservices/microservices-scaffold).
116- This command use [cookiecutter](https://github.com/cookiecutter/cookiecutter) to download and install this [template](https://github.com/python-microservices/microservices-template)
115+ This command uses [cookiecutter](https://github.com/cookiecutter/cookiecutter) to download and install this [template](https://github.com/python-microservices/microservices-template)
117116
118117**[Warning]** You must run first `pip install cookiecutter==1.7.0`
119118
@@ -124,27 +123,28 @@ pyms startproject
124123this output a lot of options step by step :
125124
126125` ` ` bash
127- project_repo_url [https://github.com/python-microservices/microservices-scaffold]:
126+ project_repo_url [https://github.com/python-microservices/microservices-scaffold]:
128127project_name [Python Microservices Boilerplate]: example project
129- project_folder [example_project]:
130- project_short_description [Python Boilerplate contains all the boilerplate you need to create a Python package.]:
131- create_model_class [y]:
132- microservice_with_swagger_and_connexion [y]:
133- microservice_with_traces [y]:
134- microservice_with_metrics [y]:
135- application_root [/example_project]:
128+ project_folder [example_project]:
129+ project_short_description [Python Boilerplate contains all the boilerplate you need to create a Python package.]:
130+ create_model_class [y]:
131+ microservice_with_swagger_and_connexion [y]:
132+ microservice_with_traces [y]:
133+ microservice_with_metrics [y]:
134+ application_root [/example_project]:
136135Select open_source_license:
1371361 - MIT license
1381372 - BSD license
1391383 - ISC license
1401394 - Apache Software License 2.0
1411405 - GNU General Public License v3
1421416 - Not open source
143- Choose from 1, 2, 3, 4, 5, 6 [1]:
142+ Choose from 1, 2, 3, 4, 5, 6 [1]:
144143` ` `
145144
146- When you finish to introduce the options, a project will be created in `[project_folder]` folder
145+ When you finish introducing the options, a project will be created in `[project_folder]` folder
147146
148147# # How To contribute
148+
149149We appreciate opening issues and pull requests to make PyMS even more stable & useful! See [This doc](CONTRIBUTING.md)
150150for more details.
0 commit comments