- Sort Score
- Num 10 results
- Language All
Results 471 - 480 of 1,058 for png (0.01 seconds)
-
docs/zh-hant/docs/tutorial/response-model.md
如此,你就能同時擁有兩種好處:具備工具支援的型別註解,以及資料過濾。 ## 在文件中查看 { #see-it-in-the-docs } 在自動文件中,你可以看到輸入模型與輸出模型各自都有自己的 JSON Schema: <img src="/img/tutorial/response-model/image01.png"> 而且兩個模型都會用在互動式 API 文件中: <img src="/img/tutorial/response-model/image02.png"> ## 其他回傳型別註解 { #other-return-type-annotations } 有時你回傳的東西不是有效的 Pydantic 欄位,你仍會在函式上加上註解,只為了獲得工具(編輯器、mypy 等)提供的支援。 ### 直接回傳 Response { #return-a-response-directly }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 14.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
"bar" ] } ``` /// tip | 提示 要声明类型为 `list` 的查询参数(如上例),你需要显式地使用 `Query`,否则它会被解释为请求体。 /// 交互式 API 文档会相应更新,以支持多个值: <img src="/img/tutorial/query-params-str-validations/image02.png"> ### 具有默认值的查询参数列表 / 多个值 { #query-parameter-list-multiple-values-with-defaults } 你还可以定义在没有给定值时的默认 `list`: {* ../../docs_src/query_params_str_validations/tutorial012_an_py310.py hl[9] *} 如果你访问:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 15.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/sql-databases.md
``` </div> 然后在 `/docs` UI 中,你能够看到 **FastAPI** 会用这些**模型**来**记录** API,并且还会用它们来**序列化**和**验证**数据。 <div class="screenshot"> <img src="/img/tutorial/sql-databases/image01.png"> </div> ## 使用多个模型更新应用 { #update-the-app-with-multiple-models } 现在让我们稍微**重构**一下这个应用,以提高**安全性**和**多功能性**。 如果你查看之前的应用程序,你可以在 UI 界面中看到,到目前为止,它允许客户端决定要创建的 `Hero` 的 `id`。😱
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 15.4K bytes - Click Count (0) -
docs/ja/docs/advanced/path-operation-advanced-configuration.md
{* ../../docs_src/path_operation_advanced_configuration/tutorial005_py310.py hl[6] *} 自動APIドキュメントを開くと、その拡張は特定の *path operation* の下部に表示されます。 <img src="/img/tutorial/path-operation-advanced-configuration/image01.png"> そして(APIの `/openapi.json` にある)生成されたOpenAPIを見ると、その拡張も特定の *path operation* の一部として確認できます。 ```JSON hl_lines="22" { "openapi": "3.1.0", "info": { "title": "FastAPI",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/ja/docs/tutorial/sql-databases.md
``` </div> その後 `/docs` の UI にアクセスすると、FastAPI がこれらのモデルを使って API をドキュメント化し、同時にデータのシリアライズとバリデーションにも使っていることがわかります。 <div class="screenshot"> <img src="/img/tutorial/sql-databases/image01.png"> </div> ## 複数モデルでアプリを更新 { #update-the-app-with-multiple-models } ここで、少しリファクタリングしてセキュリティと汎用性を高めましょう。 前のアプリでは、UI 上でクライアントが作成する `Hero` の `id` を自分で決められてしまいます。😱
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 18K bytes - Click Count (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
``` //// ..就像: {* ../../docs_src/dependencies/tutorial003_an_py310.py hl[19] *} 但是声明类型是被鼓励的,因为那样你的编辑器就会知道将传递什么作为参数 `commons` ,然后它可以帮助你完成代码,类型检查,等等: <img src="/img/tutorial/dependencies/image02.png"> ## 快捷方式 { #shortcut } 但是你可以看到,我们在这里有一些代码重复了,编写了`CommonQueryParams`两次: //// tab | Python 3.10+ ```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` ////Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 6.8K bytes - Click Count (0) -
docs/ja/docs/advanced/stream-data.md
上記の例ではバイト列をストリームしましたが、レスポンスに `Content-Type` ヘッダがないため、クライアントは受け取るデータの種類を認識できませんでした。 `StreamingResponse` を継承したカスタムクラスを作成し、ストリームするデータに応じて `Content-Type` ヘッダを設定できます。 例えば、`media_type` 属性で `Content-Type` を `image/png` に設定する `PNGStreamingResponse` を作成できます: {* ../../docs_src/stream_data/tutorial002_py310.py ln[6,19:20] hl[20] *} その後、path operation 関数で `response_class=PNGStreamingResponse` としてこの新しいクラスを使用できます:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:55:22 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/openapi-callbacks.md
### 檢查文件 { #check-the-docs } 現在你可以啟動應用,並前往 [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)。 你會在文件中看到你的「路徑操作」包含一個「Callbacks」區塊,顯示「外部 API」應該長什麼樣子:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 7.5K bytes - Click Count (0) -
docs/en/docs/advanced/custom-response.md
But as you passed the `HTMLResponse` in the `response_class` too, **FastAPI** will know how to document it in OpenAPI and the interactive docs as HTML with `text/html`: <img src="/img/tutorial/custom-response/image01.png"> ## Available responses { #available-responses } Here are some of the available responses. Keep in mind that you can use `Response` to return anything else, or even create a custom sub-class.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
/// tip | 豆知識 上述の例のように、`list`型のクエリパラメータを宣言するには明示的に`Query`を使用する必要があります。そうしない場合、リクエストボディと解釈されます。 /// 対話的APIドキュメントは複数の値を許可するために自動的に更新されます。 <img src="/img/tutorial/query-params-str-validations/image02.png"> ### デフォルト値を持つ、クエリパラメータのリスト / 複数の値 { #query-parameter-list-multiple-values-with-defaults } また、値が指定されていない場合はデフォルトの `list` を定義することもできます。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 20.3K bytes - Click Count (0)