Search Options

Results per page
Sort
Preferred Languages
Advance

Results 421 - 430 of 550 for tutorial009b_py39 (0.65 sec)

  1. 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)
  2. 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)
  3. 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)
  4. tests/test_tutorial/test_testing_dependencies/test_tutorial001.py

    import importlib
    from types import ModuleType
    
    import pytest
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="test_module",
        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),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  5. docs/de/docs/how-to/conditional-openapi.md

    Sie können problemlos dieselben Pydantic-Einstellungen verwenden, um Ihre generierte OpenAPI und die Dokumentationsoberflächen zu konfigurieren.
    
    Zum Beispiel:
    
    {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *}
    
    Hier deklarieren wir die Einstellung `openapi_url` mit dem gleichen Defaultwert `"/openapi.json"`.
    
    Und dann verwenden wir es beim Erstellen der `FastAPI`-App.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/debugging.md

    Puedes conectar el depurador en tu editor, por ejemplo con Visual Studio Code o PyCharm.
    
    ## Llama a `uvicorn` { #call-uvicorn }
    
    En tu aplicación de FastAPI, importa y ejecuta `uvicorn` directamente:
    
    {* ../../docs_src/debugging/tutorial001_py39.py hl[1,15] *}
    
    ### Acerca de `__name__ == "__main__"` { #about-name-main }
    
    El objetivo principal de `__name__ == "__main__"` es tener algo de código que se ejecute cuando tu archivo es llamado con:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_py39",
            "tutorial001_an_py39",
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.request_files.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_post_form_no_body(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params_str_validations/test_tutorial001.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),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(
            f"docs_src.query_params_str_validations.{request.param}"
        )
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/test_tutorial006c.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial006c_py39"),
            pytest.param("tutorial006c_py310", marks=needs_py310),
            pytest.param("tutorial006c_an_py39"),
            pytest.param("tutorial006c_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_param_models/test_tutorial002.py

    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)
Back to top