Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork45
fastapi + pydantic-v2 + sqlalchemy 2.0 + alembic + mysql + redis
License
NotificationsYou must be signed in to change notification settings
fastapi-practices/fastapi_sqlalchemy_mysql
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Python 3.10+
- Mysql 8.0+
- Redis 推荐最新稳定版
安装依赖项
pip install -r requirements.txt
创建一个数据库
fsm, 选择utf8mb4编码安装启动 Redis
进入 backend 目录
cd backend创建一个
.env文件touch .envcp .env.example .env
按需修改配置文件
core/conf.py和.env数据库迁移alembic
# 生成迁移文件alembic revision --autogenerate# 执行迁移alembic upgrade head
启动 fastapi 服务
# 帮助fastapi --help# 开发模式fastapi dev main.py
进入
docker-compose.yml文件所在目录,创建环境变量文件.envcd deploy/docker-compose/cp .env.server ../../backend/.env执行一键启动命令
# 根据情况使用 sudodocker-compose up -d --build等待命令自动完成
如果此项目能够帮助到你,你可以赞助作者一些咖啡豆表示鼓励:☕ Sponsor ☕
本项目根据 MIT 许可证的条款进行许可
About
fastapi + pydantic-v2 + sqlalchemy 2.0 + alembic + mysql + redis
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.