Search Options

Results per page
Sort
Preferred Languages
Advance

Results 431 - 440 of 550 for tutorial008e_py39 (0.54 sec)

  1. tests/test_tutorial/test_path_operation_configurations/test_tutorial001.py

    import pytest
    from dirty_equals import IsList
    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) -> TestClient:
        mod = importlib.import_module(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  2. docs/ru/docs/advanced/using-request-directly.md

    Представим, что вы хотите получить IP-адрес/хост клиента внутри вашей *функции-обработчика пути*.
    
    Для этого нужно обратиться к запросу напрямую.
    
    {* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *}
    
    Если объявить параметр *функции-обработчика пути* с типом `Request`, **FastAPI** поймёт, что нужно передать объект `Request` в этот параметр.
    
    /// tip | Совет
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_additional_responses/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.additional_responses.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    def test_path_operation_not_found():
        response = client.get("/items/bar")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_directly/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.response_directly.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/handling-errors.md

    Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`.
    
    ### Импортируйте `HTTPException` { #import-httpexception }
    
    {* ../../docs_src/handling_errors/tutorial001_py39.py hl[1] *}
    
    ### Вызовите `HTTPException` в своем коде { #raise-an-httpexception-in-your-code }
    
    `HTTPException` - это обычное исключение Python с дополнительными данными, актуальными для API.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. docs/ru/docs/advanced/response-directly.md

    Вы можете поместить ваш XML-контент в строку, поместить её в `Response` и вернуть:
    
    {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *}
    
    ## Примечания { #notes }
    
    Когда вы возвращаете объект `Response` напрямую, его данные не валидируются, не преобразуются (не сериализуются) и не документируются автоматически.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/response-change-status-code.md

    E então você pode definir o `status_code` neste objeto de retorno temporal.
    
    {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *}
    
    E então você pode retornar qualquer objeto que você precise, como você faria normalmente (um `dict`, um modelo de banco de dados, etc.).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_params_numeric_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),
            pytest.param("tutorial001_an_py39"),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_separate_openapi_schemas/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) -> TestClient:
        mod = importlib.import_module(f"docs_src.separate_openapi_schemas.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/static-files.md

    ## Use `StaticFiles` { #use-staticfiles }
    
    * Importe `StaticFiles`.
    * "Monte" uma instância de `StaticFiles()` em um path específico.
    
    {* ../../docs_src/static_files/tutorial001_py39.py hl[2,6] *}
    
    /// note | Detalhes Técnicos
    
    Você também pode usar `from starlette.staticfiles import StaticFiles`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.9K bytes
    - Viewed (0)
Back to top