程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

2022-06-python + restfulapi + flagger to implement back-end microservices

編輯:Python

Antecedents feed

The children have been working hard this month ! But I spent most of my time learning the knowledge of basic subjects , I like the new and hate the old ! Can not always watch video learning , Always practice , Do something that interests you ;

I wrote an article about the development and release of the front end , Now that the front-end is done , So how to develop and design back-end microservices , This is a question worthy of consideration , Of course, this is a design based on my existing cognition , No discussion with others , But do we all learn from each other in the realization of Technology ? No shame , Ha ha ha ha

Model selection analysis

Web API There is always a frame API Documentation goes with it , At present, the most famous thing is to support Open API Of Swagger 了 .
Python Of Flask Framework support Swagger UI There are also several ways

  • Flasgger: yes flask-swagger Of fork
  • flask-swagger: Long time no update , Don't have to consider
  • flask-restful-swagger: It has not been updated for two years
  • Flask-RESTPlus Of Swagger characteristic : I really need to use Flask-RESTPlus You can use it

Flasgger Reference examples : https://github.com/flasgger/flasgger/tree/master/examples

Technical realization

Project address :https://github.com/vpc123/flask-swagger.git

Directory structure :

Main function entry (app.py):


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved