Search Options

Results per page
Sort
Preferred Languages
Advance

Results 511 - 520 of 643 for tutorial005_py39 (0.07 sec)

  1. docs/es/docs/how-to/conditional-openapi.md

    Puedes usar fácilmente las mismas configuraciones de Pydantic para configurar tu OpenAPI generado y las interfaces de usuario de la documentación.
    
    Por ejemplo:
    
    {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *}
    
    Aquí declaramos la configuración `openapi_url` con el mismo valor por defecto de `"/openapi.json"`.
    
    Y luego la usamos al crear la app de `FastAPI`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_py39",
            pytest.param("tutorial001_py310", marks=needs_py310),
            "tutorial001_an_py39",
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial001_tutorial001_02.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py39"),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
            pytest.param("tutorial001_02_an_py39"),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_path_params/test_tutorial004.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_params.tutorial004_py39 import app
    
    client = TestClient(app)
    
    
    def test_file_path():
        response = client.get("/files/home/johndoe/myfile.txt")
        print(response.content)
        assert response.status_code == 200, response.text
        assert response.json() == {"file_path": "home/johndoe/myfile.txt"}
    
    
    def test_root_file_path():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_response_model/test_tutorial004.py

    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial004_py39"),
            pytest.param("tutorial004_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.response_model.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  6. docs/de/docs/advanced/response-change-status-code.md

    Anschließend können Sie den `status_code` in diesem *vorübergehenden* <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-Objekt festlegen.
    
    {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *}
    
    Und dann können Sie jedes benötigte Objekt zurückgeben, wie Sie es normalerweise tun würden (ein `dict`, ein Datenbankmodell usw.).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial004_py39"),
            pytest.param("tutorial004_py310", marks=needs_py310),
            pytest.param("tutorial004_an_py39"),
            pytest.param("tutorial004_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dataclasses/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial001_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.dataclasses_.{request.param}")
    
        client = TestClient(mod.app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    {* ../../docs_src/dependencies/tutorial007_py39.py hl[2:4] *}
    
    O valor gerado (yielded) é o que é injetado nas *operações de rota* e outras dependências:
    
    {* ../../docs_src/dependencies/tutorial007_py39.py hl[4] *}
    
    O código após o `yield` é executado após a resposta:
    
    {* ../../docs_src/dependencies/tutorial007_py39.py hl[5:6] *}
    
    /// tip | Dica
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    {* ../../docs_src/dependencies/tutorial007_py39.py hl[2:4] *}
    
    The yielded value is what is injected into *path operations* and other dependencies:
    
    {* ../../docs_src/dependencies/tutorial007_py39.py hl[4] *}
    
    The code following the `yield` statement is executed after the response:
    
    {* ../../docs_src/dependencies/tutorial007_py39.py hl[5:6] *}
    
    /// tip
    
    You can use `async` or regular functions.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.9K bytes
    - Viewed (0)
Back to top