Skip to content

Latest commit

 

History

History

{{cookiecutter.project_name}}

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FastAPI-INIT

{{cookiecutter.project_name}}

PDM

推荐使用 PDM 初始化

https://pdm.fming.dev/latest/

Linux/Mac

curl -sSL https://pdm.fming.dev/dev/install-pdm.py | python3 -

Windows

(Invoke-WebRequest -Uri https://pdm.fming.dev/dev/install-pdm.py -UseBasicParsing).Content | python -

也可以使用 pip 安装

pip install  --user pdm

初始化

pdm init

安装依赖项

运行以下命令来安装项目的依赖项。


pdm install

或者使用常规安装

pip install -r requirements.txt

运行

pdm run main.py

或者
python run main.py

image.png

API接口

http://127.0.0.1:8000/docs

image.png

Test

image.png