--- tags: backend, meeting --- # 2022/11/06 會議紀錄 ## create python venv ```bash= sudo apt-get install -y python3-venv python3 -m venv .venv source .\.venv\Scripts\activate.ps1 ``` ![](https://i.imgur.com/wq0OZHg.png) ## token 用 jwt 格式呦 ## 會議影片 - 我忘了收音QQ用北市大mail開雲端連結 - https://drive.google.com/drive/folders/1g2fTOKL99R-y_C3TjWYo53BHfGR_DvHW?usp=sharing - 內容 -- python-template範例操作 -- postman 操作 -- src/api/v1 theapp.py 內有api router -- 範例參考, 往下接著寫 ```python! @api_v1_theapp.post("/api/v1/apps", **GetAppListController.module_args()) def get_app_list(payload: GetAppListController.request_schema = Body(...), db: Session = Depends(get_db)): return GetAppListController.run(db, payload) @api_v1_theapp.get("/api/v1/app/{app_id}", **GetAppController.module_args()) def get_app_detail(app_id: str, db: Session = Depends(get_db)): return GetAppController.run(db, GetAppController.request_schema(app_id=app_id)) ``` -- 參考src/api/controller 複製一份 改名並參考修改成你要的api get_app_list_controller.py get_app_controller.py :::success 範例 - src/api/v1 theapp.py ```python! @api_v1_theapp.get("/api/v1/test") def test(): return "hi!" ``` - dev_up ```bash= scripts/cicd.sg DEV_UP ``` - http://localhost:8080/api_doc/swagger 會看到多一個GET test - try it out - execute - try url then you'll get "hi!" ::: ### 下次開會 - [ ] 11/09 20:00 - 討論sprint code review - 完成api - 整合 - 有問題會議中提出or提前丟群組