Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 751 - 760 of 880 for def2 (0.03 seconds)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

        )
        server.enqueue(
          MockResponse
            .Builder()
            .addHeader("Cache-Control: max-age=60")
            .body("DEF")
            .build(),
        )
        server.enqueue(
          MockResponse
            .Builder()
            .addHeader("Cache-Control: max-age=60")
            .body("DEFa")
            .build(),
        )
    
        val url = server.url("/same")
    
        // First QUERY request with body "foo"
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Mar 20 09:13:37 GMT 2026
    - 121K bytes
    - Click Count (0)
  2. docs/ko/docs/advanced/settings.md

    하지만 매번 다음을 수행하면:
    
    ```Python
    Settings()
    ```
    
    새 `Settings` 객체가 생성되고, 생성 시점에 `.env` 파일을 다시 읽게 됩니다.
    
    의존성 함수가 단순히 다음과 같다면:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    요청마다 객체를 생성하게 되고, 요청마다 `.env` 파일을 읽게 됩니다. ⚠️
    
    하지만 위에 `@lru_cache` 데코레이터를 사용하고 있으므로, `Settings` 객체는 최초 호출 시 딱 한 번만 생성됩니다. ✔️
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/advanced/settings.md

    從磁碟讀取檔案通常是昂貴(慢)的操作,所以你可能希望只做一次,然後重複使用同一個設定物件,而不是在每個請求都讀取。
    
    但每次我們這樣做:
    
    ```Python
    Settings()
    ```
    
    都會建立一個新的 `Settings` 物件,而且在建立時會再次讀取 `.env` 檔。
    
    如果相依函式只是像這樣:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    我們就會為每個請求建立該物件,並在每個請求都讀取 `.env` 檔。⚠️
    
    但由於我們在上方使用了 `@lru_cache` 裝飾器,`Settings` 物件只會在第一次呼叫時建立一次。✔️
    
    {* ../../docs_src/settings/app03_an_py310/main.py hl[1,11] *}
    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/en/docs/advanced/settings.md

    ```Python
    Settings()
    ```
    
    a new `Settings` object would be created, and at creation it would read the `.env` file again.
    
    If the dependency function was just like:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    we would create that object for each request, and we would be reading the `.env` file for each request. ⚠️
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  5. docs/tr/docs/advanced/settings.md

    ```Python
    Settings()
    ```
    
    yeni bir `Settings` nesnesi oluşturulur ve oluşturulurken `.env` dosyasını yeniden okur.
    
    Dependency fonksiyonu sadece şöyle olsaydı:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    bu nesneyi her request için oluştururduk ve `.env` dosyasını her request'te okurduk. ⚠️
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 11.8K bytes
    - Click Count (0)
  6. build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/SnippetsTask.groovy

                            name = null
                        } else {
                            snippet.end = lineNumber
                        }
                        return
                    }
                    def source = matchSource(line)
                    if (source.matches) {
                        lastLanguage = source.language
                        lastLanguageLine = lineNumber
                        name = source.name
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Mon Sep 20 10:08:26 GMT 2021
    - 17.8K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/tutorial/first-steps.md

    {* ../../docs_src/first_steps/tutorial001_py310.py hl[7] *}
    
    這就是一個 Python 函式。
    
    它將會在 **FastAPI** 收到一個使用 `GET` 操作、網址為「`/`」的請求時被呼叫。
    
    在這種情況下,它是一個 `async` 函式。
    
    ---
    
    你也可以將它定義為一般函式,而不是 `async def`:
    
    {* ../../docs_src/first_steps/tutorial003_py310.py hl[7] *}
    
    /// note
    
    如果你不知道差別,請查看 [Async: *"In a hurry?"*](../async.md#in-a-hurry)。
    
    ///
    
    ### 第五步:回傳內容 { #step-5-return-the-content }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 13.3K bytes
    - Click Count (0)
  8. .github/DISCUSSION_TEMPLATE/questions.yml

          placeholder: |
            from fastapi import FastAPI
    
            app = FastAPI()
    
    
            @app.get("/")
            def read_root():
                return {"Hello": "World"}
          render: python
        validations:
          required: true
      - type: textarea
        id: description
        attributes:
          label: Description
          description: |
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Aug 03 15:59:41 GMT 2023
    - 5.8K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/tutorial/server-sent-events.md

    /// tip
    
    因為 Pydantic 會在 **Rust** 端進行序列化,如果你有宣告回傳型別,效能會比未宣告時高很多。
    
    ///
    
    ### 非 async 的路徑操作函式 { #non-async-path-operation-functions }
    
    你也可以使用一般的 `def` 函式(沒有 `async`),並同樣使用 `yield`。
    
    FastAPI 會確保正確執行,不會阻塞事件迴圈。
    
    由於此函式不是 async,正確的回傳型別是 `Iterable[Item]`:
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[28:31] hl[29] *}
    
    ### 無回傳型別 { #no-return-type }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  10. docs/debugging/README.md

            "fe012443-6ba9-4ef2-bb94-b729d2060c78/test123/testw3c.pdf/xl.meta": {"Versions":[{"Type":1,"V2Obj":{"ID":"aGEA/ZUOR4ueRIZsAgfDqA==","DDir":"9MMwM47bS+K6KvQqN3hlDw==","EcAlgo":1,"EcM":2,"EcN":2,"EcBSize":1048576,"EcIndex":1,"EcDist":[4,1,2,3],"CSumAlgo":1,"PartNums":[...
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue Aug 12 18:20:36 GMT 2025
    - 8.6K bytes
    - Click Count (0)
Back to Top