- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 1,713 for path (0.03 seconds)
-
docs/zh-hant/docs/tutorial/path-params.md
# 路徑參數 { #path-parameters } 你可以用與 Python 格式化字串相同的語法來宣告路徑「參數」或「變數」: {* ../../docs_src/path_params/tutorial001_py310.py hl[6:7] *} 路徑參數 `item_id` 的值會作為引數 `item_id` 傳入你的函式。 所以,如果你執行這個範例並前往 [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo),你會看到這樣的回應: ```JSON {"item_id":"foo"} ``` ## 具型別的路徑參數 { #path-parameters-with-types } 你可以在函式中使用標準的 Python 型別註記為路徑參數宣告型別:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 8.4K bytes - Click Count (0) -
docs/en/docs/tutorial/path-params.md
```JSON { "model_name": "alexnet", "message": "Deep Learning FTW!" } ``` ## Path parameters containing paths { #path-parameters-containing-paths } Let's say you have a *path operation* with a path `/files/{file_path}`. But you need `file_path` itself to contain a *path*, like `home/johndoe/myfile.txt`. So, the URL for that file would be something like: `/files/home/johndoe/myfile.txt`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/path-params.md
# 路径参数 { #path-parameters } 你可以使用与 Python 字符串格式化相同的语法声明路径“参数”或“变量”: {* ../../docs_src/path_params/tutorial001_py310.py hl[6:7] *} 路径参数 `item_id` 的值会作为参数 `item_id` 传递给你的函数。 运行示例并访问 [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo),可获得如下响应: ```JSON {"item_id":"foo"} ``` ## 声明路径参数的类型 { #path-parameters-with-types } 使用 Python 标准类型注解,声明路径操作函数中路径参数的类型:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 7.6K bytes - Click Count (0) -
docs/ja/docs/tutorial/path-operation-configuration.md
# Path Operationの設定 { #path-operation-configuration } *path operationデコレータ*を設定するためのパラメータがいくつかあります。 /// warning | 注意 これらのパラメータは*path operationデコレータ*に直接渡され、*path operation関数*に渡されないことに注意してください。 /// ## レスポンスステータスコード { #response-status-code } *path operation*のレスポンスで使用する(HTTP)`status_code`を定義することができます。 `404`のように`int`のコードを直接渡すことができます。 しかし、それぞれの番号コードが何のためのものか覚えていない場合は、`status`のショートカット定数を使用することができます:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 4.8K bytes - Click Count (0) -
docs/en/docs/tutorial/path-operation-configuration.md
# Path Operation Configuration { #path-operation-configuration } There are several parameters that you can pass to your *path operation decorator* to configure it. /// warning Notice that these parameters are passed directly to the *path operation decorator*, not to your *path operation function*. /// ## Response Status Code { #response-status-code } You can define the (HTTP) `status_code` to be used in the response of your *path operation*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/path-operation-configuration.md
/// <img src="/img/tutorial/path-operation-configuration/image03.png"> ## 將「路徑操作」標記為已棄用 { #deprecate-a-path-operation } 若需要將「路徑操作」標記為 <dfn title="已過時,建議不要再使用">已棄用</dfn>,但不移除它,請傳入參數 `deprecated`: {* ../../docs_src/path_operation_configuration/tutorial006_py310.py hl[16] *} 在互動式文件中,它會被清楚標示為已棄用: <img src="/img/tutorial/path-operation-configuration/image04.png"> 比較已棄用與未棄用的「路徑操作」在文件中的呈現:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.8K bytes - Click Count (0) -
docs/zh/docs/advanced/path-operation-advanced-configuration.md
# 路径操作的高级配置 { #path-operation-advanced-configuration } ## OpenAPI 的 operationId { #openapi-operationid } /// warning 如果你并非 OpenAPI 的“专家”,你可能不需要这部分内容。 /// 你可以在 *路径操作* 中通过参数 `operation_id` 设置要使用的 OpenAPI `operationId`。 务必确保每个操作的 `operation_id` 都是唯一的。 {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *} ### 使用 *路径操作函数* 的函数名作为 operationId { #using-the-path-operation-function-name-as-the-operationid }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/path-operation-advanced-configuration.md
# 路徑操作進階設定 { #path-operation-advanced-configuration } ## OpenAPI operationId { #openapi-operationid } /// warning 如果你不是 OpenAPI 的「專家」,大概不需要這個。 /// 你可以用參數 `operation_id` 為你的*路徑操作(path operation)*設定要使用的 OpenAPI `operationId`。 你必須確保每個操作的 `operationId` 都是唯一的。 {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.5K bytes - Click Count (0) -
docs/ko/docs/tutorial/path-params-numeric-validations.md
# 경로 매개변수와 숫자 검증 { #path-parameters-and-numeric-validations } `Query`를 사용하여 쿼리 매개변수에 더 많은 검증과 메타데이터를 선언하는 방법과 동일하게 `Path`를 사용하여 경로 매개변수에 검증과 메타데이터를 같은 타입으로 선언할 수 있습니다. ## `Path` 임포트 { #import-path } 먼저 `fastapi`에서 `Path`를 임포트하고, `Annotated`도 임포트합니다: {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *} /// info | 정보 FastAPI는 0.95.0 버전에서 `Annotated` 지원을 추가했고(그리고 이를 권장하기 시작했습니다).Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/zh/docs/tutorial/path-params-numeric-validations.md
# 路径参数和数值校验 { #path-parameters-and-numeric-validations } 与使用 `Query` 为查询参数声明更多的校验和元数据的方式相同,你也可以使用 `Path` 为路径参数声明相同类型的校验和元数据。 ## 导入 `Path` { #import-path } 首先,从 `fastapi` 导入 `Path`,并导入 `Annotated`: {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *} /// info | 信息 FastAPI 在 0.95.0 版本添加了对 `Annotated` 的支持(并开始推荐使用它)。 如果你使用的是更旧的版本,尝试使用 `Annotated` 会报错。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6K bytes - Click Count (0)