# fir-easy-fastapi **Repository Path**: ma-zhida/fir-easy-fastapi ## Basic Information - **Project Name**: fir-easy-fastapi - **Description**: 杉极简python后端开发框架。使用FastAP,目录尽量符合Java编程风格。 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-03-26 - **Last Updated**: 2025-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

logo

Fir Easy v1.0.0

基于FastAPI实现SpringBoot结构的Python后端开发框架

## 项目简述 使用**FastAPI**。 ``` https://fastapi.tiangolo.com/zh ``` FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 并基于标准的 Python 类型提示。 | 功能 | 实现 | | :---------------: | :--: | | SpringBoot风格 | ✔ | | MySQL+TortoiseORM | ✔ | | 登录与令牌拦截器 | ✔ | | 配置文件 | ✔ | | 全局异常处理器 | ✔ | | 统一返回值 | ✔ | | Swaager风格 | ✔ | ### 项目结构 目录尽量符合Java编程风格 ``` ─src ├─api │ └─v1 ├─common ├─config │ ├─filter │ └─initialize ├─dependencies ├─dto ├─entity ├─logs ├─mapper │ └─impl ├─resources ├─servicepy │ └─impl └─application.py ``` ### 为什么这样做? ps:因为我是一个Java开发人员,朋友也都是Java开发人员,没想到现在AI趋势越来越大,我们需要使用python来实现一部分功能。 所以创建了该项目。但是我特意保留了一部分味道。 ## 安装 推荐使用python=3.11 ### 直接安装 ``` pip install -r requirements.txt ``` ### conda环境安装 ```shell conda create -n fastapi python=3.11 ``` 环境依赖安装 ```shell pip install -r requirements.txt ``` ## 启动项目 ### 编辑工具启动 支持**run**与**debug** ### 命令行 ``` python application.py ``` 添加启动参数, 切换环境 ```shell python application.py --active test ``` ## 开发文档 详见 [开发文档](doc\doc.md)