File tree Expand file tree Collapse file tree 4 files changed +48
-5
lines changed Expand file tree Collapse file tree 4 files changed +48
-5
lines changed Original file line number Diff line number Diff line change 1+ # Examples
2+
3+ ``` bash
4+ pip install py-ms
5+ ```
6+
7+ config.yml:
8+
9+ ``` yaml
10+ my-minimal-microservice :
11+ APP_NAME : " Python Microservice"
12+ ` ` `
13+
14+ main.py
15+
16+ ` ` ` python
17+ from flask import jsonify
18+
19+ from pyms.flask.app import Microservice
20+
21+ ms = Microservice(service="my-minimal-microservice", path=__file__)
22+ app = ms.create_app()
23+
24+
25+ @app.route("/")
26+ def example() :
27+ return jsonify({"main" : " hello world" })
28+
29+
30+ if __name__ == '__main__' :
31+ app.run()
32+ ` ` `
33+
34+ ` ` ` bash
35+ python main.py
36+ ```
37+
38+ Open in your browser http://localhost:5000/
39+
40+ See [ this Github page] ( https://github.com/python-microservices/pyms/tree/master/examples ) to see a examples
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ microservices with Python.
88* [ Configuration] ( configuration.md )
99* [ Services] ( services.md )
1010* [ Microservice class] ( ms_class.md )
11- * Quick start - minimum project
12- * Structure of a microservice project
13- * Swagger and connexion
14- * Tracing requests
11+ * [ Quick start and examples ] ( examples.md )
12+ * [ Structure of a microservice project] ( structure_project.md )
13+ * Swagger and connexion
14+ * Tracing requests
1515* [ Services of PyMS] ( structure.md )
Original file line number Diff line number Diff line change 9292 name: my-microservice-configmap
9393` ` `
9494
95- See more examples in TODO : add link
95+ See more examples in [this Github page](https://github.com/python-microservices/pyms/tree/master/examples)
Original file line number Diff line number Diff line change 1+ #Project structure
2+
3+ See [ Microservice Scaffold] ( https://microservices-scaffold.readthedocs.io/en/latest/structure.html ) for more info.
You can’t perform that action at this time.
0 commit comments