mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 21:55:24 +02:00
fastapi: add page and Chinese and Korean translation (#17033)
* Added tldr pages for fastapi[standard] * Removed the trailing white spaces * Updated the links * CLI to run -> Run * Modified commands to be more general * Modified changes for {{subcommand}} * Update pages.zh/common/fastapi.md * fixed bot issues * fixed the translation bot issues --------- Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
This commit is contained in:
parent
a098fa0601
commit
dd977f9733
3 changed files with 84 additions and 0 deletions
28
pages.ko/common/fastapi.md
Normal file
28
pages.ko/common/fastapi.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# fastapi
|
||||
|
||||
> Uvicorn을 기반으로 동작하는 FastAPI 앱 실행용 CLI 도구.
|
||||
> 추가 정보: <https://manned.org/fastapi>.
|
||||
|
||||
- 자동 재시작 기능을 사용하여 FastAPI 앱 실행 (개발용):
|
||||
|
||||
`fastapi run {{경로/파일.py}} --reload`
|
||||
|
||||
- 개발 모드에서 앱 실행:
|
||||
|
||||
`fastapi dev {{경로/파일.py}}`
|
||||
|
||||
- 호스트와 포트를 지정하여 실행:
|
||||
|
||||
`fastapi run {{경로/파일.py}} --host {{호스트_주소}} --port {{포트}}`
|
||||
|
||||
- 앱 변수 이름을 설정하거나 (기본값은 `app`), 앱 디렉터리를 지정:
|
||||
|
||||
`fastapi run {{경로/파일.py}} --app-dir {{경로/앱}} --app {{사용자_정의_앱명}}`
|
||||
|
||||
- 전체 도움말 보기:
|
||||
|
||||
`fastapi --help`
|
||||
|
||||
- 하위 명령어의 도움말 보기:
|
||||
|
||||
`fastapi {{하위명령어}} --help`
|
28
pages.zh/common/fastapi.md
Normal file
28
pages.zh/common/fastapi.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# fastapi
|
||||
|
||||
> 运行 FastAPI 应用的命令行工具,底层使用 Uvicorn。
|
||||
> 更多信息:<https://manned.org/fastapi>.
|
||||
|
||||
- 使用自动重载运行 FastAPI 应用(用于开发):
|
||||
|
||||
`fastapi run {{路径/文件.py}} --reload`
|
||||
|
||||
- 在开发模式下运行应用:
|
||||
|
||||
`fastapi dev {{路径/文件.py}}`
|
||||
|
||||
- 指定运行的主机和端口:
|
||||
|
||||
`fastapi run {{路径/文件.py}} --host {{主机地址}} --port {{端口}}`
|
||||
|
||||
- 设置应用变量名(如果不是 `app`)或指定自定义应用目录:
|
||||
|
||||
`fastapi run {{路径/文件.py}} --app-dir {{路径/到/应用}} --app {{自定义_app_名称}}`
|
||||
|
||||
- 显示帮助信息:
|
||||
|
||||
`fastapi --help`
|
||||
|
||||
- 显示子命令的帮助信息:
|
||||
|
||||
`fastapi {{子命令}} --help`
|
28
pages/common/fastapi.md
Normal file
28
pages/common/fastapi.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# fastapi
|
||||
|
||||
> Run FastAPI apps which uses Uvicorn under the hood.
|
||||
> More information: <https://manned.org/fastapi>.
|
||||
|
||||
- Run a FastAPI app with automatic reload (for development):
|
||||
|
||||
`fastapi run {{path/to/file.py}} --reload`
|
||||
|
||||
- Serve your app in both development mode:
|
||||
|
||||
`fastapi dev {{path/to/file.py}}`
|
||||
|
||||
- Specify the host and port to run on:
|
||||
|
||||
`fastapi run {{path/to/file.py}} --host {{host_address}} --port {{port}}`
|
||||
|
||||
- Set the app variable name (if not `app`) or specify a custom app directory:
|
||||
|
||||
`fastapi run {{path/to/file.py}} --app-dir {{path/to/app}} --app {{custom_app_name}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`fastapi --help`
|
||||
|
||||
- Display help for a subcommand:
|
||||
|
||||
`fastapi {{subcommand}} --help`
|
Loading…
Add table
Reference in a new issue