Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 151 - 160 of 880 for resync (0.09 seconds)

  1. docs/uk/docs/tutorial/stream-json-lines.md

    ///
    
    ### Не-async *функції операцій шляху* { #non-async-path-operation-functions }
    
    Ви також можете використовувати звичайні функції `def` (без `async`) і використовувати `yield` так само.
    
    FastAPI подбає про коректне виконання, щоб це не блокувало цикл подій.
    
    Оскільки в цьому випадку функція не є async, правильним типом повернення буде `Iterable[Item]`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:25:54 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/dependencies/index.md

    當你在「大型程式碼庫」中,於許多「路徑操作」反覆使用「相同的依賴」時,這會特別有用。
    
    ## 要不要使用 `async` { #to-async-or-not-to-async }
    
    因為依賴也會由 **FastAPI** 呼叫(就像你的「路徑操作函式」),所以在定義函式時套用相同的規則。
    
    你可以使用 `async def` 或一般的 `def`。
    
    而且你可以在一般 `def` 的「路徑操作函式」中宣告 `async def` 的依賴,或在 `async def` 的「路徑操作函式」中宣告 `def` 的依賴,等等。
    
    都沒關係。**FastAPI** 會知道該怎麼做。
    
    /// note | 注意
    
    如果你不熟悉,請參考文件中的 [Async: "In a hurry?"](../../async.md#in-a-hurry) 一節,瞭解 `async` 與 `await`。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  3. docs/fr/docs/advanced/events.md

    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    Dans les versions récentes de Python, il existe aussi un **gestionnaire de contexte asynchrone**. Vous l'utiliseriez avec `async with` :
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 9.1K bytes
    - Click Count (0)
  4. docs/tr/docs/tutorial/dependencies/index.md

    ## `async` Olsa da Olmasa da { #to-async-or-not-to-async }
    
    Dependency'ler de **FastAPI** tarafından çağrılacağı için (tıpkı *path operation function*'larınız gibi), fonksiyonları tanımlarken aynı kurallar geçerlidir.
    
    `async def` ya da normal `def` kullanabilirsiniz.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 10.2K bytes
    - Click Count (0)
  5. docs_src/request_files/tutorial003_an_py310.py

    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(
        files: Annotated[list[bytes], File(description="Multiple files as bytes")],
    ):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(
        files: Annotated[
            list[UploadFile], File(description="Multiple files as UploadFile")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 952 bytes
    - Click Count (0)
  6. tests/test_request_param_model_by_alias.py

    
    class Model(BaseModel):
        param: str = Field(alias="param_alias")
    
    
    @app.get("/query")
    async def query_model(data: Model = Query()):
        return {"param": data.param}
    
    
    @app.get("/header")
    async def header_model(data: Model = Header()):
        return {"param": data.param}
    
    
    @app.get("/cookie")
    async def cookie_model(data: Model = Cookie()):
        return {"param": data.param}
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  7. docs/en/docs/advanced/stream-data.md

    ### Files and Async { #files-and-async }
    
    In most cases, file-like objects are not compatible with async and await by default.
    
    For example, they don't have an `await file.read()`, or `async for chunk in 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)
  8. .teamcity/src/main/kotlin/util/AdHocPerformanceScenario.kt

            allowEmpty = false,
            description =
                "Command line option for the performance test task to enable profiling. " +
                    "For example `async-profiler`, `async-profiler-heap`, `async-profiler-wall`, `async-profiler-all` or `jfr`. Use `none` for benchmarking only.",
        )
    }
    
    object AdHocPerformanceScenarioLinux : AdHocPerformanceScenario(Os.LINUX)
    
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Mon Mar 30 14:08:32 GMT 2026
    - 6K bytes
    - Click Count (0)
  9. docs/es/docs/advanced/events.md

    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    En versiones recientes de Python, también hay un **async context manager**. Lo usarías con `async with`:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  10. docs/fr/docs/advanced/stream-data.md

    ### Gérer les fichiers et async { #files-and-async }
    
    Dans la plupart des cas, les objets de type fichier ne sont pas compatibles avec `async` et `await` par défaut.
    
    Par exemple, ils n'ont pas de `await file.read()`, ni de `async for chunk in file`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:33:45 GMT 2026
    - 6.2K bytes
    - Click Count (0)
Back to Top