- pip install fastapi
- pip install "uvicorn[standard]”
- pip install tortoise-orm
- pip install python-jose
- pip install passlib
- pip install python-multipart
- pip install aiomysql
- pip install aerich
- pip install bcrypt
- aerich init -t database.config.CONFIG # 初始化配置文件
- aerich init-db # 初始化数据库, 一般在第一次使用时执行
- aerich migrate [--name] (标记修改操作) # 更新操作并生成迁移文件
- aerich upgrade # 更新数据库
- aerich downgrade # 回滚数据库
- aerich history # 查看历史操作
uvicorn main:app --reload
- 100-109:模型相关
- 110-119:组件相关
- 120-129:用户相关