- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 980 for tutorial008_py310 (0.09 seconds)
-
docs/tr/docs/tutorial/server-sent-events.md
{* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Yield edilen her öğe JSON olarak kodlanır ve bir SSE olayının `data:` alanında gönderilir. Dönüş tipini `AsyncIterable[Item]` olarak bildirirseniz, FastAPI bunu Pydantic ile veriyi **doğrulamak**, **belgelemek** ve **serileştirmek** için kullanır. {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *} /// tip | İpucuCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:51:35 GMT 2026 - 5.1K bytes - Click Count (0) -
docs/ru/docs/tutorial/server-sent-events.md
{* ../../docs_src/server_sent_events/tutorial001_py310.py ln[28:31] hl[29] *} ### Без объявленного типа возврата { #no-return-type } Вы также можете опустить тип возврата. FastAPI использует [`jsonable_encoder`](./encoder.md) для преобразования данных и их отправки. {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[34:37] hl[35] *} ## `ServerSentEvent` { #serversentevent }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.4K bytes - Click Count (0) -
docs/es/docs/advanced/custom-response.md
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse } Toma algún texto o bytes y devuelve un response HTML, como leíste arriba. ### `PlainTextResponse` { #plaintextresponse } Toma algún texto o bytes y devuelve un response de texto plano. {* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *} ### `JSONResponse` { #jsonresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 11.6K bytes - Click Count (0) -
docs/fr/docs/tutorial/server-sent-events.md
{* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Chaque élément produit avec `yield` est encodé en JSON et envoyé dans le champ `data:` d’un événement SSE. Si vous déclarez le type de retour comme `AsyncIterable[Item]`, FastAPI l’utilisera pour **valider**, **documenter** et **sérialiser** les données avec Pydantic. {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:33:45 GMT 2026 - 5.3K bytes - Click Count (0) -
docs/zh/docs/tutorial/handling-errors.md
{* ../../docs_src/handling_errors/tutorial002_py310.py hl[14] *} ## 安装自定义异常处理器 { #install-custom-exception-handlers } 可以使用[与 Starlette 相同的异常处理工具](https://www.starlette.dev/exceptions/)添加自定义异常处理器。 假设有一个自定义异常 `UnicornException`(你自己或你使用的库可能会 `raise` 它)。 并且你希望用 FastAPI 在全局处理该异常。 此时,可以用 `@app.exception_handler()` 添加自定义异常处理器: {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/server-sent-events.md
從 `fastapi.sse` 匯入 `EventSourceResponse`: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} 每個 `yield` 的項目都會以 JSON 編碼並放在 SSE 事件的 `data:` 欄位中送出。 如果你把回傳型別宣告為 `AsyncIterable[Item]`,FastAPI 會用它來透過 Pydantic 進行**驗證**、**文件化**與**序列化**。 {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *} /// tip 因為 Pydantic 會在 **Rust** 端進行序列化,如果你有宣告回傳型別,效能會比未宣告時高很多。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:33:04 GMT 2026 - 4.6K bytes - Click Count (0) -
docs/fr/docs/advanced/custom-response.md
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse } Prend du texte ou des octets et renvoie une réponse HTML, comme vous l'avez vu ci-dessus. ### `PlainTextResponse` { #plaintextresponse } Prend du texte ou des octets et renvoie une réponse en texte brut. {* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 12.3K bytes - Click Count (0) -
docs/es/docs/tutorial/handling-errors.md
## Usa `HTTPException` { #use-httpexception } Para devolver responses HTTP con errores al cliente, usa `HTTPException`. ### Importa `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *} ### Lanza un `HTTPException` en tu código { #raise-an-httpexception-in-your-code } `HTTPException` es una excepción de Python normal con datos adicionales relevantes para APIs.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 9.6K bytes - Click Count (0) -
docs/pt/docs/tutorial/handling-errors.md
## Use o `HTTPException` { #use-httpexception } Para retornar ao cliente *responses* HTTP com erros, use o `HTTPException`. ### Import `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *} ### Lance o `HTTPException` no seu código { #raise-an-httpexception-in-your-code }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/zh/docs/advanced/custom-response.md
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse } 如上文所述,接受文本或字节并返回 HTML 响应。 ### `PlainTextResponse` { #plaintextresponse } 接受文本或字节并返回纯文本响应。 {* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *} ### `JSONResponse` { #jsonresponse } 接受数据并返回一个 `application/json` 编码的响应。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.4K bytes - Click Count (0)