fastapi非常奈斯,作为API开发那是相当优秀的框架,但我们在开发过程中,前期搭建会花费大量的时间,且还不尽人意。
为此我集成了fastapi-scaf一键生成项目与api,让开发变得更简单。
This package can be installed using pip (>=Python3.9):
pip install fastapi-scaf
fastapi-scaf new cd to project root dirfastapi-scaf add cd apppip install -r requirements.txtuvicorn main:app --host=0.0.0.0 --port=8000 --log-level=debug --log-config=../config/uvicorn_logging.json --workers=5└── fastapi-scaf ├── app (应用) │ ├── api ├── (api) │ │ └── v1 │ └── (v1) │ ├── business ├── (业务) │ ├── datatype ├── (数据类型) │ ├── initializer ├── (初始化) │ │ ├── conf │ ├── (配置) │ │ ├── db │ ├── (数据库) │ │ ├── logger │ ├── (日志) │ │ └── ... │ └── (...) │ ├── middleware ├── (中间件) │ ├── router ├── (路由) │ └── utils └── (utils) ├── config (配置目录) ├── deploy (部署目录) ├── docs (文档目录) ├── log (日志目录) ├── .gitignore ├── LICENSE └── README.md