Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1581 - 1590 of 1,916 for FastApi (0.05 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top