Python-快速搭建一个管理平台

目录

[📜 准备工作](#📜 准备工作)

[一、项目介绍 ✨](#一、项目介绍 ✨)

[二、制作数据库表 + 添加信息 ⚒️](#二、制作数据库表 + 添加信息 ⚒️)

[三、运行client.exe 🚀](#三、运行client.exe 🚀)

1、连接数据库,选择对应表,生成代码

2、把后端代码依次复制到项目中

3、把前端代码依次复制到前端项目中

4、添加路由

[四、运行后端项目 🎉](#四、运行后端项目 🎉)

1、安装第三方库

2、运行项目

[五、运行前端项目 🎉](#五、运行前端项目 🎉)

1、安装包

2、运行项目

[六、涉及开源项目与框架 💎](#六、涉及开源项目与框架 💎)

1、前端

2、后端

对于不需要复杂权限控制的小型项目,十分适用,可以快速一个管理平台

视频操作:

https://www.bilibili.com/video/BV1Bx4y1z7XGhttps://www.bilibili.com/video/BV1Bx4y1z7XG

📜 准备工作

1 、node版本大于等于v16.20.2【推荐用nvm】

Nvm 安装教程:前端------Windows安装NVM(下载与使用)_window nvm 下载-CSDN博客文章浏览阅读1.5k次,点赞12次,收藏22次。在 Windows 上安装 Node Version Manager(NVM)可以让您轻松管理不同版本的 Node.js。首先,从 GitHub 上下载最新的 NVM for Windows 安装程序,并执行安装。安装完成后,在命令行中输入 nvm 命令即可验证安装。接着,使用 nvm install 命令安装所需的 Node.js 版本,例如 nvm install 14.17.0。通过 nvm use 来切换使用特定版本,例如 nvm use 14.17.0。_window nvm 下载https://blog.csdn.net/Pan_peter/article/details/136487076
2 、安装Python(版本大于等于3.8) 【推荐用conda,自行找conda安装教程】
项目包:

项目包.zip - 蓝奏云文件大小:17.9 M|https://wwm.lanzout.com/ihQOR1xblvdg

一、项目介绍 ✨

client.exe ------通过已有数据库表,生成FastAPI接口、前端接口、前端页面的配置
生成代码前后端代码:

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

前端框架:React

后端框架:bottle

二、制作数据库表 + 添加信息 ⚒️

使用Navicat、PyCharm等

sql 复制代码
use yolov8;



-- auto-generated definition

create table user

(

    id       int auto_increment comment '用户id'

        primary key,

    username varchar(50)  not null comment '用户名',

    password varchar(20)  not null comment '密码',

    email    varchar(30)  not null comment '邮箱',

    usertype   int null comment '类型'

);



INSERT INTO user (username, password, email, usertype) VALUES ('user1', 'password1', 'user1@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user2', 'password2', 'user2@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user3', 'password3', 'user3@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user4', 'password4', 'user4@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user5', 'password5', 'user5@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user6', 'password6', 'user6@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user7', 'password7', 'user7@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user8', 'password8', 'user8@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user9', 'password9', 'user9@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user10', 'password10', 'user10@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user11', 'password11', 'user11@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user12', 'password12', 'user12@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user13', 'password13', 'user13@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user14', 'password14', 'user14@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user15', 'password15', 'user15@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user16', 'password16', 'user16@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user17', 'password17', 'user17@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user18', 'password18', 'user18@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user19', 'password19', 'user19@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user20', 'password20', 'user20@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user21', 'password21', 'user20@example.com', 1);

三、运行client.exe 🚀

1、连接数据库,选择对应表,生成代码

2、把后端代码依次复制到项目中


3、把前端代码依次复制到前端项目中

这三个文件

4、添加路由

四、运行后端项目 🎉

1、安装第三方库

pip install -r requirements-all.txt

2、运行项目

python main.py

五、运行前端项目 🎉

1、安装包

npm install --force

2、运行项目

npm run dev

六、涉及开源项目与框架 💎

1、前端

面向配置,生成前端的CRUD页面:FastCrud | 基于配置 & 快速开发crud面向配置的CRUD编程.http://fast-crud.docmirror.cn/

2、后端

Fastapi

相关推荐
拓云者也2 分钟前
常用的生物信息学数据库以及处理工具
数据库·python·oracle·r语言·bash
GISer_Jing3 分钟前
原生HTML项目重构:Vue/React双框架实战
vue.js·人工智能·arcgis·重构·html
SunnyRivers4 分钟前
Python 的下一代 HTTP 客户端 HTTPX 特性详解
python·httpx
hcnaisd24 分钟前
机器学习模型部署:将模型转化为Web API
jvm·数据库·python
李慕婉学姐6 分钟前
【开题答辩过程】以《基于SpringBoot Vue的校园后勤管理系统设计与实现》为例,不知道这个选题怎么做的,不知道这个选题怎么开题答辩的可以进来看看
vue.js·spring boot·后端
果粒蹬i9 分钟前
Python + AI:打造你的智能害虫识别助手
开发语言·人工智能·python
红色的小鳄鱼10 分钟前
Vue 教程 自定义指令 + 生命周期全解析
开发语言·前端·javascript·vue.js·前端框架·html
阿钱真强道10 分钟前
09 jetlinks-mqtt-属性主动上报-windows-python-实现
开发语言·windows·python·网络协议
Blossom.11810 分钟前
从单点工具到智能流水线:企业级多智能体AI开发工作流架构实战
人工智能·笔记·python·深度学习·神经网络·架构·whisper
亚林瓜子11 分钟前
pyspark添加一列时间戳数据并改名
python·spark