GitPedia

Dfs generate

从数据库逆向生成SQLModel、TortoiseORM模型、FastAPI 接口、Vue TS后台管理页,有效减少重复编码,👀

From zy7y·Updated December 31, 2025·View on GitHub·

通过已有数据库表,生成FastAPI接口的工具项目,最终目的为FastAPI使用者,减少代码; 项目启发 Mybatis 逆向工程、[pdmaner](https://gitee.com/robergroup/pdmaner) The project is written primarily in Python, distributed under the MIT License license, first published in 2023. Key topics include: fast-crud, fastapi, generator, mysql, pydantic-v2.

Latest release: v0.2.7
July 14, 2024View Changelog →

dfs-generate codecov

通过已有数据库表,生成FastAPI接口的工具项目,最终目的为FastAPI使用者,减少代码; 项目启发 Mybatis 逆向工程、pdmaner

已支持从数据库表生成

  • SQLModel
  • Tortoise ORM
  • Vue、React
  • FastAPI 增加、删除、分页查询、详情查询、更新接口

Generate Code

FastAPI SQLModel MySQL

FastAPI Tortoise ORM MySQL

使用过程中有疑问、或其他宝贵意见 -> issues,如果你对这个项目感兴趣,欢迎加入共同实现,

桌面端下载

支持 Windows、MacOS
下载最新版本

源码运行

<details> <summary>查看详情</summary>

注意:开发使用环境 Node18.15 Python3.11,不低于该要求最佳。

1. 下载源码

shell
git clone https://github.com/zy7y/dfs-generate.git

以下命令均在源码根目录执行

2. 前端

进入目录

shell
cd web

安装依赖

shell
npm i

打包编译

shell
npm run build

3. 后端

虚拟环境(可选)

shell
python -m venv venv # windows 激活虚拟环境 venv\Scripts\activate # mac 、linux 激活虚拟环境 source venv/bin/activate

安装依赖

shell
pip install -r requirements.txt

运行

解决找不到模块问题
mac / linux export PYTHONPATH=./ windows set PYTHONPATH=./

shell
python dfs_generate/server.py

访问

注意:端口8080,请确保该端口未被占用

shell
http://127.0.0.1:8080
</details>

更新日志

Star History

<!-- STAR_HISTORY -->

Star History Chart

<!-- /STAR_HISTORY --> <!-- CONTRIBUTORS_SECTION --> <!-- /CONTRIBUTORS_SECTION -->

赞赏

wechat

Contributors

Showing top 3 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from zy7y/dfs-generate via the GitHub API.Last fetched: 6/23/2026