# fastapi-starter **Repository Path**: xuqihui/fastapi-starter ## Basic Information - **Project Name**: fastapi-starter - **Description**: FastAPI-Starter 包含基本的RBAC实现,支持SQLAlchemy异步Session - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2025-01-12 - **Last Updated**: 2025-08-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FastAPI-Starter [![](https://img.shields.io/badge/Python-3.12-red.svg)](https://www.python.org/downloads) [![](https://img.shields.io/badge/FastAPI-0.116.1-yellowgreen.svg)](https://fastapi.tiangolo.com/) ### 项目介绍 FastAPI-Starter 包含基本的RBAC实现 * 登录鉴权 * 权限管理 * 角色管理 * 用户管理 > 1. api,api接口 > 2. core,项目核心依赖 > 3. logs,日志输出 > 4. models,模型相关 > 5. sql,sql初始化 > 6. tests,单元测试 > 7. utils,通用工具类 > 8. main.py,程序启动的入口 > 9. cli.py,自定义指令 ### 软件版本 * Python: 3.12.x * MySQL: 8.x ### 命令介绍 ```shell # 开发服务启动 fastapi dev main.py # 创建一个api包 python cli.py api createpackage # 执行测试数据库初始化 cd sql sh init_db.sh # 执行单元测试 cd tests sh runtest.sh ``` ### 可用依赖Depends * SQLAlchemy异步Session,Depends(bind_db_session) * 登录校验,Depends(required_login) * 接口权限校验,Depends(RequiredPermission)