Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 611 - 620 of 1,104 for Async (0.09 seconds)

  1. docs/zh-hant/docs/advanced/dataclasses.md

    7. 這裡 `response_model` 使用的是「`Author` dataclass 的清單」這種型別註記。
    
       同樣地,你可以把 `dataclasses` 與標準型別註記組合使用。
    8. 注意這個「路徑操作函式」使用的是一般的 `def` 而非 `async def`。
    
       一如往常,在 FastAPI 中你可以視需要混用 `def` 與 `async def`。
    
       如果需要複習何時用哪個,請參考文件中關於 [`async` 與 `await`](../async.md#in-a-hurry) 的章節「In a hurry?」。
    9. 這個「路徑操作函式」回傳的不是 dataclass(雖然也可以),而是一個包含內部資料的字典清單。
    
       FastAPI 會使用 `response_model` 參數(其中包含 dataclass)來轉換回應。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  2. docs/ja/docs/advanced/dataclasses.md

    7. ここでは `response_model` に `Author` dataclass のリストという型注釈を使用しています。
    
        このように、`dataclasses` は標準の型注釈と組み合わせられます。
    
    8. この *path operation 関数* は、`async def` ではなく通常の `def` を使用しています。
    
        いつもどおり、FastAPI では必要に応じて `def` と `async def` を組み合わせられます。
    
        どちらをいつ使うかの復習が必要な場合は、[`async` と `await`](../async.md#in-a-hurry) に関するドキュメントの _"In a hurry?"_ セクションを参照してください。
    
    9. この *path operation 関数* は(可能ではありますが)dataclass 自体は返さず、内部データを持つ辞書のリストを返しています。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 5K bytes
    - Click Count (0)
  3. docs/fr/docs/tutorial/request-files.md

        - C'est particulièrement utile si vous exécutez `await myfile.read()` une fois puis devez relire le contenu.
    - `close()` : ferme le fichier.
    
    Comme toutes ces méthodes sont `async`, vous devez les « await ».
    
    Par exemple, à l'intérieur d'une *fonction de chemin d'accès* `async`, vous pouvez obtenir le contenu avec :
    
    ```Python
    contents = await myfile.read()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  4. docs/es/docs/tutorial/request-files.md

    * `close()`: Cierra el archivo.
    
    Como todos estos métodos son métodos `async`, necesitas "await" para ellos.
    
    Por ejemplo, dentro de una *path operation function* `async` puedes obtener los contenidos con:
    
    ```Python
    contents = await myfile.read()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  5. docs/tr/docs/tutorial/server-sent-events.md

    ///
    
    ### Async Olmayan Path Operation Fonksiyonları { #non-async-path-operation-functions }
    
    Normal `def` fonksiyonlarını (yani `async` olmadan) da kullanabilir ve aynı şekilde `yield` kullanabilirsiniz.
    
    FastAPI, event loop'u bloke etmeyecek şekilde doğru biçimde çalışmasını sağlar.
    
    Bu örnekte fonksiyon async olmadığı için doğru dönüş tipi `Iterable[Item]` olur:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:51:35 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  6. tests/test_form_default.py

    from fastapi import FastAPI, File, Form
    from starlette.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.post("/urlencoded")
    async def post_url_encoded(age: Annotated[int | None, Form()] = None):
        return age
    
    
    @app.post("/multipart")
    async def post_multi_part(
        age: Annotated[int | None, Form()] = None,
        file: Annotated[bytes | None, File()] = None,
    ):
        return {"file": file, "age": age}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 829 bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/request-files.md

    `UploadFile` 具有以下 `async` 方法。它们都会在底层调用对应的文件方法(使用内部的 `SpooledTemporaryFile`)。
    
    * `write(data)`:将 `data` (`str` 或 `bytes`) 写入文件。
    * `read(size)`:读取文件中 `size` (`int`) 个字节/字符。
    * `seek(offset)`:移动到文件中字节位置 `offset` (`int`)。
        * 例如,`await myfile.seek(0)` 会移动到文件开头。
        * 如果你先运行过 `await myfile.read()`,然后需要再次读取内容时,这尤其有用。
    * `close()`:关闭文件。
    
    由于这些方法都是 `async` 方法,你需要对它们使用 await。
    
    例如,在 `async` *路径操作函数* 内,你可以这样获取内容:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  8. tests/test_additional_responses_response_class.py

    
    @app.get(
        "/a",
        response_class=JsonApiResponse,
        responses={500: {"description": "Error", "model": JsonApiError}},
    )
    async def a():
        pass  # pragma: no cover
    
    
    @app.get("/b", responses={500: {"description": "Error", "model": Error}})
    async def b():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  9. tests/test_additional_responses_union_duplicate_anyof.py

                "model": ModelA | ModelB,
                "content": {"application/json": {"examples": {"Case A": {"value": "a"}}}},
            }
        }
    )
    
    
    @app.get("/route1")
    async def route1():
        pass  # pragma: no cover
    
    
    @app.get("/route2")
    async def route2():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 4.3K bytes
    - Click Count (0)
  10. tensorflow/c/eager/c_api_experimental.cc

                              in_flight_nodes_limit);
    }
    
    void TFE_DeleteExecutor(TFE_Executor* executor) { delete executor; }
    
    bool TFE_ExecutorIsAsync(TFE_Executor* executor) {
      return executor->executor()->Async();
    }
    
    void TFE_ExecutorWaitForAllPendingNodes(TFE_Executor* executor,
                                            TF_Status* status) {
      status->status = executor->executor()->WaitForAllPendingNodes();
    }
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 35.9K bytes
    - Click Count (0)
Back to Top