- Sort Score
- Result 10 results
- Languages All
Results 1581 - 1590 of 1,916 for FastApi (0.05 sec)
-
docs/pt/docs/tutorial/query-param-models.md
/// note | Nota Isso รฉ suportado desde o FastAPI versรฃo `0.115.0`. ๐ค /// ## Parรขmetros de Consulta com um Modelo Pydantic { #query-parameters-with-a-pydantic-model } Declare os **parรขmetros de consulta** que vocรช precisa em um **modelo Pydantic**, e entรฃo declare o parรขmetro como `Query`: {* ../../docs_src/query_param_models/tutorial001_an_py310.py hl[9:13,17] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 408 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial002_py39 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 419 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial001.py
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": { "responses": { "200": { "description": "Successful Response",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 826 bytes - Viewed (0) -
tests/test_tutorial/test_wsgi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.wsgi.tutorial001_py39 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 441 bytes - Viewed (1) -
docs/ko/docs/advanced/async-tests.md
# ๋น๋๊ธฐ ํ ์คํธ ์ฝ๋ ์์ฑ ์ด์ ์ฅ์์ `TestClient` ๋ฅผ ์ด์ฉํด **FastAPI** ์ดํ๋ฆฌ์ผ์ด์ ํ ์คํธ๋ฅผ ์์ฑํ๋ ๋ฒ์ ๋ฐฐ์ฐ์ จ์ํ ๋ฐ์. ์ง๊ธ๊น์ง๋ `async` ํค์๋ ์ฌ์ฉ์์ด ๋๊ธฐ ํจ์์ ํ ์คํธ ์ฝ๋๋ฅผ ์์ฑํ๋ ๋ฒ๋ง ์ตํ์ต๋๋ค. ํ์ง๋ง ๋น๋๊ธฐ ํจ์๋ฅผ ์ฌ์ฉํ์ฌ ํ ์คํธ ์ฝ๋๋ฅผ ์์ฑํ๋ ๊ฒ์ ๋งค์ฐ ์ ์ฉํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค๋ฉด ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋น๋๊ธฐ๋ก ์ฟผ๋ฆฌํ๋ ๊ฒฝ์ฐ๋ฅผ ์๊ฐํด๋ด ์๋ค. FastAPI ์ ํ๋ฆฌ์ผ์ด์ ์ ์์ฒญ์ ๋ณด๋ด๊ณ , ๋น๋๊ธฐ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐฑ์๋๊ฐ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ฌ๋ฐ๋ฅด๊ฒ ๋ฐ์ดํฐ๋ฅผ ๊ธฐ๋กํ๋์ง ํ์ธํ๊ณ ์ถ์ ๋๊ฐ ์์ ๊ฒ๋๋ค. ์ด๋ฐ ๊ฒฝ์ฐ์ ํ ์คํธ ์ฝ๋๋ฅผ ์ด๋ป๊ฒ ๋น๋๊ธฐ๋ก ์์ฑํ๋์ง ์์๋ด ์๋ค. ## pytest.mark.anyio ์์์ ์์ฑํ ํ ์คํธ ํจ์์์ ๋น๋๊ธฐ ํจ์๋ฅผ ํธ์ถํ๊ณ ์ถ๋ค๋ฉด, ํ ์คํธ ์ฝ๋๋ ๋น๋๊ธฐ ํจ์์ฌ์ผํฉ๋๋ค.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 10 11:03:16 UTC 2024 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial001_py39 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
docs_src/dependencies/tutorial008_an_py39.py
from typing import Annotated from fastapi import Depends async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 521 bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=[needs_py310]), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=[needs_py310]), ], )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial002_py39 import app client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)