- Sort Score
- Num 10 results
- Language All
Results 1061 - 1070 of 1,523 for FastApi (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_request_params/test_header/test_optional_list.py
from typing import Annotated, Optional import pytest from fastapi import FastAPI, Header from fastapi.testclient import TestClient from pydantic import BaseModel, Field app = FastAPI() # ===================================================================================== # Without aliases @app.get("/optional-list-str") async def read_optional_list_str( p: Annotated[Optional[list[str]], Header()] = None, ):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
/// note **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`. Le `Union` dans `Union[str, None]` permettra à votre éditeur de vous offrir un meilleur support et de détecter les erreurs. /// ## Validation additionnelle
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Nov 09 16:39:20 GMT 2024 - 9.5K bytes - Click Count (0) -
docs/en/docs/tutorial/path-params.md
```JSON {"item_id":3} ``` /// check Notice that the value your function received (and returned) is `3`, as a Python `int`, not a string `"3"`. So, with that type declaration, **FastAPI** gives you automatic request <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>. /// ## Data validation { #data-validation }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9.2K bytes - Click Count (0) -
docs/es/docs/tutorial/path-params.md
```JSON {"item_id":3} ``` /// check | Revisa Nota que el valor que tu función recibió (y devolvió) es `3`, como un `int` de Python, no un string `"3"`. Entonces, con esa declaración de tipo, **FastAPI** te ofrece <abbr title="convertir el string que viene de un request HTTP en datos de Python">"parsing"</abbr> automático de request. /// ## Validación de datos { #data-validation }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9.8K bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial010_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.custom_response.{request.param}") client = TestClient(mod.app) return client
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.3K bytes - Click Count (0) -
docs/zh-hant/docs/async.md
但同時,使用 `async def` 定義的函式本身也必須被「等待」。所以,帶有 `async def` 函式只能在其他使用 `async def` 定義的函式內呼叫。 那麼,這就像「先有雞還是先有蛋」的問題,要如何呼叫第一個 `async` 函式呢? 如果你使用 FastAPI,無需擔心這個問題,因為「第一個」函式將是你的*路徑操作函式*,FastAPI 會知道如何正確處理這個問題。 但如果你想在沒有 FastAPI 的情況下使用 `async` / `await`,你也可以這樣做。 ### 編寫自己的非同步程式碼
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:56:21 GMT 2025 - 21.1K bytes - Click Count (0) -
docs/zh/docs/async.md
但与此同时,必须"等待"通过 `async def` 定义的函数。因此,带 `async def` 的函数也只能在 `async def` 定义的函数内部调用。 那么,这关于先有鸡还是先有蛋的问题,如何调用第一个 `async` 函数? 如果你使用 **FastAPI**,你不必担心这一点,因为"第一个"函数将是你的路径操作函数,FastAPI 将知道如何做正确的事情。 但如果你想在没有 FastAPI 的情况下使用 `async` / `await`,则可以这样做。 ### 编写自己的异步代码
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:56:21 GMT 2025 - 21.5K bytes - Click Count (0) -
docs/ru/docs/tutorial/header-param-models.md
/// note | Заметка Этот функционал доступен в FastAPI начиная с версии `0.115.0`. 🤓 /// ## Header-параметры в виде Pydantic-модели { #header-parameters-with-a-pydantic-model } Объявите нужные **header-параметры** в **Pydantic-модели** и затем аннотируйте параметр как `Header`: {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 4.3K bytes - Click Count (0) -
docs/ja/docs/advanced/websockets.md
{* ../../docs_src/websockets/tutorial001.py hl[2,6:38,41:43] *} ## `websocket` を作成する **FastAPI** アプリケーションで、`websocket` を作成します。 {* ../../docs_src/websockets/tutorial001.py hl[1,46:47] *} /// note | 技術詳細 `from starlette.websockets import WebSocket` を使用しても構いません. **FastAPI** は開発者の利便性のために、同じ `WebSocket` を提供します。しかし、こちらはStarletteから直接提供されるものです。 /// ## メッセージの送受信Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 7.1K bytes - Click Count (0) -
docs/de/docs/tutorial/cors.md
## `CORSMiddleware` verwenden { #use-corsmiddleware } Sie können das in Ihrer **FastAPI**-Anwendung mit der `CORSMiddleware` konfigurieren. * Importieren Sie `CORSMiddleware`. * Erstellen Sie eine Liste der erlaubten Origins (als Strings). * Fügen Sie es als „Middleware“ zu Ihrer **FastAPI**-Anwendung hinzu. Sie können auch angeben, ob Ihr Backend erlaubt:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.3K bytes - Click Count (0)