- Sort Score
- Result 10 results
- Languages All
Results 641 - 650 of 877 for tutorial002 (0.09 sec)
-
tests/test_tutorial/test_custom_response/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial005 import app client = TestClient(app) def test_get(): response = client.get("/") assert response.status_code == 200, response.text assert response.text == "Hello World" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 980 bytes - Viewed (0) -
docs/em/docs/tutorial/body-fields.md
## 🗄 `Field` 🥇, 👆 ✔️ 🗄 ⚫️: //// tab | 🐍 3️⃣.6️⃣ & 🔛 ```Python hl_lines="4" {!> ../../docs_src/body_fields/tutorial001.py!} ``` //// //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛 ```Python hl_lines="2" {!> ../../docs_src/body_fields/tutorial001_py310.py!} ``` //// /// warning
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python {!> ../../docs_src/security/tutorial001.py!} ``` //// ## Run it /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/index.md
然后,依赖项函数返回包含这些值的 `dict`。 ### 导入 `Depends` ```Python hl_lines="3" {!../../docs_src/dependencies/tutorial001.py!} ``` ### 声明依赖项 与在*路径操作函数*参数中使用 `Body`、`Query` 的方式相同,声明依赖项需要使用 `Depends` 和一个新的参数: ```Python hl_lines="15 20" {!../../docs_src/dependencies/tutorial001.py!} ``` 虽然,在路径操作函数的参数中使用 `Depends` 的方式与 `Body`、`Query` 相同,但 `Depends` 的工作方式略有不同。 这里只能传给 Depends 一个参数。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/sub-dependencies.md
//// //// tab | Python 3.6 без Annotated /// tip | "Подсказка" Предпочтительнее использовать версию с аннотацией, если это возможно. /// ```Python hl_lines="8-9" {!> ../../docs_src/dependencies/tutorial005.py!} ``` //// Она объявляет необязательный параметр запроса `q` как строку, а затем возвращает его.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/sub-dependencies.md
``` //// //// tab | Python 3.8 non-Annotated /// tip | "Dica" Utilize a versão com `Annotated` se possível. /// ```Python hl_lines="8-9" {!> ../../docs_src/dependencies/tutorial005.py!} ``` //// Esse código declara um parâmetro de consulta opcional, `q`, com o tipo `str`, e então retorna esse parâmetro.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.9K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
接下来,使用 **FastAPI** 工具获取用户名与密码。 ### `OAuth2PasswordRequestForm` 首先,导入 `OAuth2PasswordRequestForm`,然后,在 `/token` *路径操作* 中,用 `Depends` 把该类作为依赖项。 ```Python hl_lines="4 76" {!../../docs_src/security/tutorial003.py!} ``` `OAuth2PasswordRequestForm` 是用以下几项内容声明表单请求体的类依赖项: * `username` * `password` * 可选的 `scope` 字段,由多个空格分隔的字符串组成的长字符串 * 可选的 `grant_type` /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/middleware.md
* 이 함수는 `request`를 해당하는 *경로 작업*으로 전달합니다. * 그런 다음, *경로 작업*에 의해 생성된 `response` 를 반환합니다. * `response`를 반환하기 전에 추가로 `response`를 수정할 수 있습니다. ```Python hl_lines="8-9 11 14" {!../../docs_src/middleware/tutorial001.py!} ``` /// tip | "팁" 사용자 정의 헤더는 <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">'X-' 접두사를 사용</a>하여 추가할 수 있습니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.4K bytes - Viewed (0) -
scripts/playwright/separate_openapi_schemas/image03.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 13 09:14:46 UTC 2024 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial006 import app client = TestClient(app) def test_post(): response = client.post("/items/", content=b"this is actually not validated") assert response.status_code == 200, response.text assert response.json() == { "size": 30, "content": { "name": "Maaaagic", "price": 42,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0)