- router 编写接口的
- template 放代码生成模板
- util 放系统的工具类和项目配置等代码
pip install poetry
poetry config repositories.pypi https://pypi.tuna.tsinghua.edu.cn/simple/
poetry update
docker run --restart=always --name redis -d -p 6379:6379 redis
pre-commit install
pre-commit run --all-files
auto-commit.bat
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=root
DB_NAME=study
f5
docker 镜像
docker build -t fastweb .
或
docker build -t fastweb -f ./Dockerfile2-1 . (依赖不变都不用重新编构建)
docker build -t fastweb -f ./Dockerfile2-2 .
docker run -d -p 8000:8000 fastweb
可执行文件
python build.py
fastapi 文档
https://fastapi.tiangolo.com/zh/tutorial/first-steps/
jinja2 模板引擎文档
http://docs.jinkan.org/docs/jinja2/index.html