Search Options

Results per page
Sort
Preferred Languages
Advance

Results 881 - 890 of 924 for docs_src (0.03 sec)

  1. tests/test_tutorial/test_body_multiple_params/test_tutorial002.py

        params=[
            pytest.param("tutorial002_py39"),
            pytest.param("tutorial002_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.body_multiple_params.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_post_all(client: TestClient):
        response = client.put(
            "/items/5",
            json={
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 11K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_nested_models/test_tutorial005.py

        params=[
            pytest.param("tutorial005_py39"),
            pytest.param("tutorial005_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_put_all(client: TestClient):
        response = client.put(
            "/items/123",
            json={
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  3. docs/ko/docs/advanced/additional-status-codes.md

    하지만 새로운 항목을 허용하기를 원할 것입니다. 항목이 이전에 존재하지 않았다면 이를 생성하고 HTTP 상태 코드 201 "Created"를 반환합니다.
    
    이를 위해서는 `JSONResponse`를 가져와서 원하는 `status_code`를 설정하여 콘텐츠를 직접 반환합니다:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    /// warning | 경고
    
    위의 예제처럼 `Response`를 직접 반환하면 바로 반환됩니다.
    
    모델 등과 함께 직렬화되지 않습니다.
    
    원하는 데이터가 있는지, 값이 유효한 JSON인지 확인합니다(`JSONResponse`를 사용하는 경우).
    
    ///
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Dec 09 12:22:47 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. docs/es/docs/advanced/testing-dependencies.md

    Y entonces **FastAPI** llamará a esa dependencia para sobreescribir en lugar de la dependencia original.
    
    {* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *}
    
    /// tip | Consejo
    
    Puedes sobreescribir una dependencia utilizada en cualquier lugar de tu aplicación **FastAPI**.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/testing-dependencies.md

    And then **FastAPI** will call that override instead of the original dependency.
    
    {* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *}
    
    /// tip
    
    You can set a dependency override for a dependency used anywhere in your **FastAPI** application.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/using-request-directly.md

    Let's imagine you want to get the client's IP address/host inside of your *path operation function*.
    
    For that you need to access the request directly.
    
    {* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *}
    
    By declaring a *path operation function* parameter with the type being the `Request` **FastAPI** will know to pass the `Request` in that parameter.
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/conditional-openapi.md

    You can easily use the same Pydantic settings to configure your generated OpenAPI and the docs UIs.
    
    For example:
    
    {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *}
    
    Here we declare the setting `openapi_url` with the same default of `"/openapi.json"`.
    
    And then we use it when creating the `FastAPI` app.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_fields/test_tutorial001.py

            "tutorial001_an_py39",
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.body_fields.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_items_5(client: TestClient):
        response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dataclasses/test_tutorial003.py

        params=[
            pytest.param("tutorial003_py39"),
            pytest.param("tutorial003_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.dataclasses_.{request.param}")
    
        client = TestClient(mod.app)
        client.headers.clear()
        return client
    
    
    def test_post_authors_item(client: TestClient):
        response = client.post(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/security/oauth2-jwt.md

    응답을 위한 토큰 엔드포인트에 사용될 Pydantic 모델을 정의합니다.
    
    새 액세스 토큰을 생성하기 위한 유틸리티 함수를 생성합니다.
    
    {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *}
    
    ## 의존성 수정
    
    `get_current_user` 함수를 이전과 동일한 토큰을 받도록 수정하되, 이번에는 JWT 토큰을 사용하도록 합니다.
    
    받은 토큰을 디코딩하여 검증한 후 현재 사용자를 반환합니다.
    
    토큰이 유효하지 않다면 HTTP 오류를 반환합니다.
    
    {* ../../docs_src/security/tutorial004_an_py310.py hl[90:107] *}
    
    ## `/token` 경로 작업 수정
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 12.2K bytes
    - Viewed (0)
Back to top