3 Star 25 Fork 16

而立科技/FastAPI-Plus-Demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dev_model_2_db.py 334 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhenqiang.sun 提交于 2020-11-18 21:14 . model2db增加引入model
from fastapi_plus.model.base import Base
from sqlalchemy import create_engine
from app.config.db import db_config
from app.model import *
# 根据Mode创建DB数据表
if __name__ == '__main__':
# 创建db连接
engine = create_engine(db_config.get_url(), echo=True)
# 创建db表
Base.metadata.create_all(engine)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/erlitech/fastapi_demo.git
git@gitee.com:erlitech/fastapi_demo.git
erlitech
fastapi_demo
FastAPI-Plus-Demo
main

搜索帮助