- Sort Score
- Result 10 results
- Languages All
Results 711 - 720 of 877 for tutorial002 (0.18 sec)
-
docs/em/docs/advanced/response-change-status-code.md
## ⚙️ `Response` 🔢 👆 💪 📣 🔢 🆎 `Response` 👆 *➡ 🛠️ 🔢* (👆 💪 🍪 & 🎚). & ⤴️ 👆 💪 ⚒ `status_code` 👈 *🔀* 📨 🎚. ```Python hl_lines="1 9 12" {!../../docs_src/response_change_status_code/tutorial001.py!} ``` & ⤴️ 👆 💪 📨 🙆 🎚 👆 💪, 👆 🛎 🔜 ( `dict`, 💽 🏷, ♒️). & 🚥 👆 📣 `response_model`, ⚫️ 🔜 ⚙️ ⛽ & 🗜 🎚 👆 📨.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial004 import app client = TestClient(app) html_contents = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ def test_get_custom_response(): response = client.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_metadata/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.metadata.tutorial004 import app client = TestClient(app) def test_path_operations(): response = client.get("/items/") assert response.status_code == 200, response.text response = client.get("/users/") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.extending_openapi.tutorial001 import app client = TestClient(app) def test(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Foo"}] 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 - 1.5K bytes - Viewed (0) -
scripts/playwright/cookie_param_models/image01.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/security/first-steps.md
``` //// //// tab | Python 3.8+ без Annotated /// tip | "Подсказка" Предпочтительнее использовать версию с аннотацией, если это возможно. /// ```Python {!> ../../docs_src/security/tutorial001.py!} ``` //// ## Запуск /// info | "Дополнительная информация"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
And then you can set the `status_code` in that *temporal* response object. ```Python hl_lines="1 9 12" {!../../docs_src/response_change_status_code/tutorial001.py!} ``` And then you can return any object you need, as you normally would (a `dict`, a database model, etc). And if you declared a `response_model`, it will still be used to filter and convert the object you returned.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client() -> TestClient: from docs_src.separate_openapi_schemas.tutorial001 import app client = TestClient(app) return client def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 4.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/index.md
そして、これらの値を含む`dict`を返します。 ### `Depends`のインポート ```Python hl_lines="3" {!../../docs_src/dependencies/tutorial001.py!} ``` ### "dependant"での依存関係の宣言 *path operation関数*のパラメータに`Body`や`Query`などを使用するのと同じように、新しいパラメータに`Depends`を使用することができます: ```Python hl_lines="13 18" {!../../docs_src/dependencies/tutorial001.py!} ``` 関数のパラメータに`Depends`を使用するのは`Body`や`Query`などと同じですが、`Depends`の動作は少し異なります。 `Depends`は1つのパラメータしか与えられません。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/body-fields.md
``` //// //// tab | Python 3.8+ Annotated가 없는 경우 /// tip | "팁" 가능하다면 `Annotated`가 달린 버전을 권장합니다. /// ```Python hl_lines="4" {!> ../../docs_src/body_fields/tutorial001.py!} ``` //// /// warning | "경고" `Field`는 다른 것들처럼 (`Query`, `Path`, `Body` 등) `fastapi`에서가 아닌 `pydantic`에서 바로 임포트 되는 점에 주의하세요. /// ## 모델 어트리뷰트 선언 그 다음 모델 어트리뷰트와 함께 `Field`를 사용할 수 있습니다:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.2K bytes - Viewed (0)