Giter VIP home page Giter VIP logo

zy7y / dfs-generate Goto Github PK

View Code? Open in Web Editor NEW
90.0 1.0 20.0 2.77 MB

从数据库逆向生成SQLModel、TortoiseORM模型、FastAPI 接口、Vue TS后台管理页,有效减少重复编码,👀https://www.bilibili.com/video/BV1Gp4y1d7P8/

License: MIT License

Python 81.05% HTML 0.62% CSS 0.93% JavaScript 17.40%
fastapi generator mysql pydantic-v2 sqlmodel tortoise-orm fast-crud vue react typescript

dfs-generate's People

Contributors

296711867 avatar c929947 avatar zy7y avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dfs-generate's Issues

如果长时间不动会白屏

0.2.4 client.exe
打开程序,连接数据库。
等一会儿,再重新点击两种数据库时会出现如下图白屏的情况
image

估计是时间久了,数据库连接断开了?
是否应该在点击时做下判断,如果断开了就重新连接数据库

TODO

表转代码

  • #30
  • 支持SQLlite
  • 支持持直接写入到本机指定目录下

前端

其他

TODO

  • 工具页面优化
  • 支持直接导出、减少复制频率
  • 可执行程序体积优化

如何使用test模块进行单元测试

执行测试函数:
image

报错信息:
image

ModuleNotFoundError: No module named 'types_map'

使用环境:

  • Windows10
  • PYcharm2021.2.1
  • Python3.9

问题判断:
导包问题,因为项目结构,用PYcharm时,导致从根目录找寻types_map.py,所以无法找到'types_map'

解决方法:
导入方法采用相对导入:
在tools.py中换成from .types_map import TYPES

与此同时,conversion.py中,也可以换成from .tools import to_pascal, tran, to_snake
因为当我们环境中第三方库tools时,PYcharm2021.2.1也会报红提示,但不会影响项目运行

瘦身 移除依赖

移除以下、依赖库或DB

  • fastapi 替换为bottle
  • pydantic 移除
  • uvicorn 移除
  • sqlite记录数据移除
  • sqlalchemy
  • jinja2
  • ...

请问支持mysql 数据库吗

请问支持mysql 数据库吗 我使用了mysql数据库 数据库链接成功 表也出来了 , 当选择生成代码的时候 提供 表不存在 或链接错误

有些数据库无法创建

下面这张表无法创建对应的代码。
pycharm环境和 打包好的exe文件都不能生成。麻烦大佬看看

mysql> CREATE TABLE students (  
    student_id VARCHAR(20) PRIMARY KEY,  -- 学号  
    name VARCHAR(50) NOT NULL,           -- 姓名  
    class VARCHAR(50) NOT NULL           -- 班级 
);```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.