- Sort Score
- Num 10 results
- Language All
Results 861 - 870 of 2,110 for py$ (0.06 seconds)
-
docs/en/docs/tutorial/handling-errors.md
To return HTTP responses with errors to the client you use `HTTPException`. ### Import `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *} ### Raise an `HTTPException` in your code { #raise-an-httpexception-in-your-code } `HTTPException` is a normal Python exception with additional data relevant for APIs.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.9K bytes - Click Count (0) -
docs/ja/docs/tutorial/body-nested-models.md
そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます: {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *} ## セット型 { #set-types } しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。 そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。 そして、`tags`を文字列のセットとして宣言できます: {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *} これを使えば、データが重複しているリクエストを受けた場合でも、ユニークな項目のセットに変換されます。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 8.6K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/response-model.md
我們可以改為建立一個包含明文密碼的輸入模型,以及一個不含密碼的輸出模型: {* ../../docs_src/response_model/tutorial003_py310.py hl[9,11,16] *} 在這裡,雖然「路徑操作函式」回傳的是同一個包含密碼的輸入使用者: {* ../../docs_src/response_model/tutorial003_py310.py hl[24] *} ...我們把 `response_model` 宣告為不包含密碼的 `UserOut` 模型: {* ../../docs_src/response_model/tutorial003_py310.py hl[22] *} 因此,FastAPI 會負責(透過 Pydantic)過濾掉輸出模型中未宣告的所有資料。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/ko/docs/tutorial/body-multiple-params.md
먼저, 물론 `Path`, `Query` 및 요청 본문 매개변수 선언을 자유롭게 혼합해서 사용할 수 있고, **FastAPI**는 어떤 동작을 할지 압니다. 또한 기본 값을 `None`으로 설정해 본문 매개변수를 선택사항으로 선언할 수 있습니다: {* ../../docs_src/body_multiple_params/tutorial001_an_py310.py hl[18:20] *} /// note | 참고 이 경우에는 본문에서 가져올 `item`이 선택사항이라는 점을 유의하세요. 기본값이 `None`이기 때문입니다. /// ## 다중 본문 매개변수 { #multiple-body-parameters } 이전 예제에서, *경로 처리*는 아래처럼 `Item`의 속성을 가진 JSON 본문을 예상합니다:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 5.5K bytes - Click Count (0) -
docs/en/docs/tutorial/server-sent-events.md
{* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Each yielded item is encoded as JSON and sent in the `data:` field of an SSE event. If you declare the return type as `AsyncIterable[Item]`, FastAPI will use it to **validate**, **document**, and **serialize** the data using Pydantic. {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *} /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.6K bytes - Click Count (0) -
docs/en/docs/advanced/custom-response.md
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *} ## HTML Response { #html-response } To return a response with HTML directly from **FastAPI**, use `HTMLResponse`. * Import `HTMLResponse`. * Pass `HTMLResponse` as the parameter `response_class` of your *path operation decorator*. {* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *} /// infoCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
docs/uk/docs/tutorial/first-steps.md
# Перші кроки { #first-steps } Найпростіший файл FastAPI може виглядати так: {* ../../docs_src/first_steps/tutorial001_py310.py *} Скопіюйте це до файлу `main.py`. Запустіть live-сервер: <div class="termy"> ```console $ <font color="#4E9A06">fastapi</font> dev <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting development server 🚀Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 18.7K bytes - Click Count (0) -
docs/en/docs/python-types.md
{* ../../docs_src/python_types/tutorial003_py310.py hl[1] *} Because the editor knows the types of the variables, you don't only get completion, you also get error checks: <img src="/img/python-types/image04.png"> Now you know that you have to fix it, convert `age` to a string with `str(age)`: {* ../../docs_src/python_types/tutorial004_py310.py hl[2] *} ## Declaring types { #declaring-types }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/en/docs/advanced/websockets.md
{* ../../docs_src/websockets_/tutorial001_py310.py hl[2,6:38,41:43] *} ## Create a `websocket` { #create-a-websocket } In your **FastAPI** application, create a `websocket`: {* ../../docs_src/websockets_/tutorial001_py310.py hl[1,46:47] *} /// note | Technical Details You could also use `from starlette.websockets import WebSocket`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 07 09:29:03 GMT 2026 - 5.3K bytes - Click Count (0) -
docs/ja/docs/how-to/custom-request-and-route.md
例外が発生しても、`Request` インスタンスはスコープ内に残るため、エラー処理時にリクエストボディを読み取り、活用できます: {* ../../docs_src/custom_request_and_route/tutorial002_an_py310.py hl[17:19] *} ## ルーターでのカスタム `APIRoute` クラス { #custom-apiroute-class-in-a-router } `APIRouter` の `route_class` パラメータを設定することもできます: {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 5.4K bytes - Click Count (0)