随笔分类 -  Python

摘要:第1层: 各模块定义路由 ↓ 第2层: v1/router.py 聚合路由 ↓ 第3层: main.py 注册到应用 第1层:定义路由 # app/v1/admin/users.py from fastapi import APIRouter router = APIRouter() # ← 创建路 阅读全文
posted @ 2025-11-18 11:35 窦戈 阅读(47) 评论(0) 推荐(0)
摘要:# FastAPI Test Project ## 项目简介 这是一个使用 FastAPI 框架的测试项目。 ## 技术栈 - Python >= 3.13 - FastAPI >= 0.121.2 - Uvicorn >= 0.38.0 - uv (包管理工具) ## 环境配置 ### 虚拟环境说 阅读全文
posted @ 2025-11-17 21:06 窦戈 阅读(77) 评论(0) 推荐(0)
摘要:以超级用户身份连接 ./psql -U postgres -d dotest -- 授予 public 模式的所有权限 GRANT ALL ON SCHEMA public TO dotest; -- 授予在 public 模式中创建对象的权限 GRANT CREATE ON SCHEMA publ 阅读全文
posted @ 2025-04-02 06:45 窦戈 阅读(106) 评论(0) 推荐(0)
摘要:pycharm 创建Django项目 创建应用 (app) python3 manage.py startapp polls 注册APP 编写URL和视图函数对应关系 【urls.py】 数据库操作 安装第三方模块 pip install mysqlclient 连接数据库 django操作表 fr 阅读全文
posted @ 2024-03-07 15:46 窦戈 阅读(50) 评论(0) 推荐(0)
摘要:> 摘自:https://www.cainiaoxueyuan.com/bc/36825.html # Flask安装 ```shell pip install Flask ``` # 项目配置 ### debug模式 Host 端口号 ![](https://img2023.cnblogs.com 阅读全文
posted @ 2023-06-24 19:56 窦戈 阅读(121) 评论(0) 推荐(0)