- Sort Score
- Result 10 results
- Languages All
Results 461 - 470 of 890 for docs_src (0.08 sec)
-
docs/ja/docs/tutorial/body-fields.md
## `Field`のインポート まず、以下のようにインポートします: ```Python hl_lines="4" {!../../docs_src/body_fields/tutorial001.py!} ``` /// warning | "注意" `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。 /// ## モデルの属性の宣言 以下のように`Field`をモデルの属性として使用することができます: ```Python hl_lines="11 12 13 14" {!../../docs_src/body_fields/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.5K bytes - Viewed (0) -
docs/em/docs/advanced/testing-websockets.md
# 🔬 *️⃣ 👆 💪 ⚙️ 🎏 `TestClient` 💯*️⃣. 👉, 👆 ⚙️ `TestClient` `with` 📄, 🔗*️⃣: ```Python hl_lines="27-31" {!../../docs_src/app_testing/tutorial002.py!} ``` /// note 🌅 ℹ, ✅ 💃 🧾 <a href="https://www.starlette.io/testclient/#testing-websocket-sessions" class="external-link" target="_blank">🔬 *️⃣ </a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 371 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial002 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie-and-object/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 414 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial001.py
from docs_src.app_testing.tutorial001 import client, test_read_main def test_main(): test_read_main() def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/": { "get": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 821 bytes - Viewed (0) -
tests/test_tutorial/test_wsgi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.wsgi.tutorial001 import app client = TestClient(app) def test_flask(): response = client.get("/v1/") assert response.status_code == 200, response.text assert response.text == "Hello, World from Flask!" def test_app(): response = client.get("/v2") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 436 bytes - Viewed (1) -
docs/en/docs/advanced/security/oauth2-scopes.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 11:02:16 UTC 2024 - 13.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/sub-dependencies.md
**FastAPI** 负责处理解析不同深度的子依赖项。 ### 第一层依赖项 下列代码创建了第一层依赖项: ```Python hl_lines="8-9" {!../../docs_src/dependencies/tutorial005.py!} ``` 这段代码声明了类型为 `str` 的可选查询参数 `q`,然后返回这个查询参数。 这个函数很简单(不过也没什么用),但却有助于让我们专注于了解子依赖项的工作方式。 ### 第二层依赖项 接下来,创建另一个依赖项函数,并同时用该依赖项自身再声明一个依赖项(所以这也是一个「依赖项」): ```Python hl_lines="13" {!../../docs_src/dependencies/tutorial005.py!} ``` 这里重点说明一下声明的参数: * 尽管该函数自身是依赖项,但还声明了另一个依赖项(它「依赖」于其他对象)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
docs/tr/docs/advanced/testing-websockets.md
# WebSockets'i Test Etmek WebSockets testi yapmak için `TestClient`'ı kullanabilirsiniz. Bu işlem için, `TestClient`'ı bir `with` ifadesinde kullanarak WebSocket'e bağlanabilirsiniz: ```Python hl_lines="27-31" {!../../docs_src/app_testing/tutorial002.py!} ``` /// note | "Not"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 472 bytes - Viewed (0) -
docs/ja/docs/tutorial/cookie-params.md
## `Cookie`をインポート まず、`Cookie`をインポートします: ```Python hl_lines="3" {!../../docs_src/cookie_params/tutorial001.py!} ``` ## `Cookie`のパラメータを宣言 次に、`Path`や`Query`と同じ構造を使ってクッキーのパラメータを宣言します。 最初の値がデフォルト値で、追加の検証パラメータや注釈パラメータをすべて渡すことができます: ```Python hl_lines="9" {!../../docs_src/cookie_params/tutorial001.py!} ``` /// note | "技術詳細"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.4K bytes - Viewed (0) -
docs/en/docs/advanced/response-cookies.md
## Use a `Response` parameter You can declare a parameter of type `Response` in your *path operation function*. And then you can set cookies in that *temporal* response object. ```Python hl_lines="1 8-9" {!../../docs_src/response_cookies/tutorial002.py!} ``` And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0)