Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 61 - 70 of 1,139 for docs_src (0.05 seconds)

  1. docs/ko/docs/tutorial/server-sent-events.md

    `EventSourceResponse`는 `fastapi.sse`에서 임포트합니다:
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *}
    
    각 `yield`된 항목은 JSON으로 인코딩되어 SSE 이벤트의 `data:` 필드로 전송됩니다.
    
    반환 타입을 `AsyncIterable[Item]`으로 선언하면 FastAPI가 이를 사용해 데이터를 Pydantic으로 **검증**, **문서화**, **직렬화**합니다.
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *}
    
    /// tip | 팁
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:56:39 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/background-tasks.md

    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *}
    
    ## Add the background task { #add-the-background-task }
    
    Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`:
    
    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[14] *}
    
    `.add_task()` receives as arguments:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/advanced/settings.md

    ## 在另一個模組中的設定 { #settings-in-another-module }
    
    你也可以把這些設定放在另一個模組檔案中,就像在[更大的應用程式 - 多個檔案](../tutorial/bigger-applications.md)所示。
    
    例如,你可以有一個 `config.py` 檔案如下:
    
    {* ../../docs_src/settings/app01_py310/config.py *}
    
    然後在 `main.py` 檔案中使用它:
    
    {* ../../docs_src/settings/app01_py310/main.py hl[3,11:13] *}
    
    /// tip
    
    你也需要一個 `__init__.py` 檔案,詳見[更大的應用程式 - 多個檔案](../tutorial/bigger-applications.md)。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/dependencies/classes-as-dependencies.md

    這也適用於完全沒有參數的 callable,就和沒有參數的路徑操作函式一樣。
    
    接著,我們可以把上面的相依項(dependable)`common_parameters` 改成類別 `CommonQueryParams`:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *}
    
    注意用來建立該類別實例的 `__init__` 方法:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *}
    
    ...它的參數與我們之前的 `common_parameters` 相同:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *}
    
    **FastAPI** 會用這些參數來「解析」該相依性。
    
    兩種情況下都會有:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/advanced/testing-events.md

    當你需要在測試中執行 lifespan(生命週期)時,你可以使用 TestClient 並搭配 with 陳述式:
    
    {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *}
    
    你可以閱讀更多細節:[在測試中執行 lifespan](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)(Starlette 官方文件)。
    
    對於已棄用的 `startup` 和 `shutdown` 事件,你可以這樣使用 TestClient:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 618 bytes
    - Click Count (0)
  6. docs/ko/docs/advanced/path-operation-advanced-configuration.md

    각 작업마다 고유하도록 보장해야 합니다.
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001_py310.py hl[6] *}
    
    ### *경로 처리 함수* 이름을 operationId로 사용하기 { #using-the-path-operation-function-name-as-the-operationid }
    
    API의 함수 이름을 `operationId`로 사용하고 싶다면, 모든 API를 순회하면서 `APIRoute.name`을 사용해 각 *경로 처리*의 `operation_id`를 덮어쓸 수 있습니다.
    
    모든 *경로 처리*를 추가한 뒤에 수행해야 합니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  7. docs/ko/docs/tutorial/body-nested-models.md

    마찬가지로 예제에서 `tags`를 구체적으로 "문자열의 리스트"로 만들 수 있습니다:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## 집합 타입 { #set-types }
    
    그런데 생각해보니 태그는 반복되면 안 되고, 아마 고유한 문자열이어야 할 것입니다.
    
    그리고 파이썬에는 고유한 항목들의 집합을 위한 특별한 데이터 타입 `set`이 있습니다.
    
    그렇다면 `tags`를 문자열의 집합으로 선언할 수 있습니다:
    
    {* ../../docs_src/body_nested_models/tutorial003_py310.py hl[12] *}
    
    이렇게 하면 중복 데이터가 있는 요청을 받더라도 고유한 항목들의 집합으로 변환됩니다.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.7K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/sql-databases.md

    {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[48:55] hl[51:52,54] *}
    
    ### Read One Hero { #read-one-hero }
    
    We can **read** a single `Hero`.
    
    {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[58:63] hl[60] *}
    
    ### Delete a Hero { #delete-a-hero }
    
    We can also **delete** a `Hero`.
    
    {* ../../docs_src/sql_databases/tutorial001_an_py310.py ln[66:73] hl[71] *}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 15.3K bytes
    - Click Count (0)
  9. docs/en/docs/tutorial/response-model.md

    {* ../../docs_src/response_model/tutorial003_py310.py hl[9,11,16] *}
    
    Here, even though our *path operation function* is returning the same input user that contains the password:
    
    {* ../../docs_src/response_model/tutorial003_py310.py hl[24] *}
    
    ...we declared the `response_model` to be our model `UserOut`, that doesn't include the password:
    
    {* ../../docs_src/response_model/tutorial003_py310.py hl[22] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 15.5K bytes
    - Click Count (0)
  10. docs/en/docs/advanced/stream-data.md

    {* ../../docs_src/stream_data/tutorial002_py310.py ln[6,19:20] hl[20] *}
    
    Then you can use this new class in `response_class=PNGStreamingResponse` in your *path operation function*:
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[23:27] hl[23] *}
    
    ### Simulate a File { #simulate-a-file }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.4K bytes
    - Click Count (0)
Back to Top