Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for fsync (2.71 sec)

  1. docs/en/docs/advanced/dataclasses.md

    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    
        If you need a refresher about when to use which, check out the section _"In a hurry?"_ in the docs about [`async` and `await`](../async.md#in-a-hurry){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/request-files.md

    * `close()`: ๐Ÿ” ๐Ÿ“.
    
    ๐ŸŒ ๐Ÿ‘ซ ๐Ÿ‘ฉโ€๐Ÿ”ฌ `async` ๐Ÿ‘ฉโ€๐Ÿ”ฌ, ๐Ÿ‘† ๐Ÿ’ช "โŒ›" ๐Ÿ‘ซ.
    
    ๐Ÿ–ผ, ๐Ÿ”˜ `async` *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข* ๐Ÿ‘† ๐Ÿ’ช ๐Ÿคš ๐ŸŽš โฎ๏ธ:
    
    ```Python
    contents = await myfile.read()
    ```
    
    ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ”˜ ๐Ÿ˜ `def` *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข*, ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ” `UploadFile.file` ๐Ÿ”—, ๐Ÿ–ผ:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note "`async` ๐Ÿ“ก โ„น"
        ๐Ÿ•โ” ๐Ÿ‘† โš™๏ธ `async` ๐Ÿ‘ฉโ€๐Ÿ”ฌ, **FastAPI** ๐Ÿƒ ๐Ÿ“ ๐Ÿ‘ฉโ€๐Ÿ”ฌ ๐Ÿงต & โŒ› ๐Ÿ‘ซ.
    
    !!! note "๐Ÿ’ƒ ๐Ÿ“ก โ„น"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/request-files.md

    * `close()`: ํŒŒ์ผ์„ ๋‹ซ์Šต๋‹ˆ๋‹ค.
    
    ์ƒ๊ธฐ ๋ชจ๋“  ๋ฉ”์†Œ๋“œ๋“ค์ด `async` ๋ฉ”์†Œ๋“œ์ด๊ธฐ ๋•Œ๋ฌธ์— โ€œawaitโ€์„ ์‚ฌ์šฉํ•˜์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.
    
    ์˜ˆ๋ฅผ๋“ค์–ด, `async` *๊ฒฝ๋กœ ์ž‘๋™ ํ•จ์ˆ˜*์˜ ๋‚ด๋ถ€์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ๋‚ด์šฉ์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
    
    ```Python
    contents = await myfile.read()
    ```
    
    ๋งŒ์•ฝ ์ผ๋ฐ˜์ ์ธ `def` *๊ฒฝ๋กœ ์ž‘๋™ ํ•จ์ˆ˜*์˜ ๋‚ด๋ถ€๋ผ๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์ด `UploadFile.file` ์— ์ง์ ‘ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note  "`async` ๊ธฐ์ˆ ์  ์„ธ๋ถ€์‚ฌํ•ญ"
        `async` ๋ฉ”์†Œ๋“œ๋“ค์„ ์‚ฌ์šฉํ•  ๋•Œ **FastAPI**๋Š” ์Šค๋ ˆ๋“œํ’€์—์„œ ํŒŒ์ผ ๋ฉ”์†Œ๋“œ๋“ค์„ ์‹คํ–‰ํ•˜๊ณ  ๊ทธ๋“ค์„ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/testing.md

    !!! tip
        If you want to call `async` functions in your tests apart from sending requests to your FastAPI application (e.g. asynchronous database functions), have a look at the [Async Tests](../advanced/async-tests.md){.internal-link target=_blank} in the advanced tutorial.
    
    ## Separating tests
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/first-steps.md

    In diesem Fall handelt es sich um eine `async`-Funktion.
    
    ---
    
    Sie kรถnnten sie auch als normale Funktion anstelle von `async def` definieren:
    
    ```Python hl_lines="7"
    {!../../../docs_src/first_steps/tutorial003.py!}
    ```
    
    !!! note "Hinweis"
        Wenn Sie den Unterschied nicht kennen, lesen Sie [Async: *โ€žIn Eile?โ€œ*](../async.md#in-eile){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 12:16:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. docs/pl/docs/index.md

    <details markdown="1">
    <summary>Albo uลผyj <code>async def</code>...</summary>
    
    Jeลผeli twรณj kod korzysta z `async` / `await`, uลผyj `async def`:
    
    ```Python hl_lines="9  14"
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  7. docs/ru/docs/index.md

    <details markdown="1">
    <summary>ะ˜ะปะธ ะธัะฟะพะปัŒะทัƒะนั‚ะต <code>async def</code>...</summary>
    
    ะ•ัะปะธ ะฒะฐัˆ ะบะพะด ะธัะฟะพะปัŒะทัƒะตั‚ `async` / `await`, ะธัะฟะพะปัŒะทัƒะนั‚ะต `async def`:
    
    ```Python hl_lines="9  14"
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  8. docs/it/docs/index.md

    <details markdown="1">
    <summary>Oppure usa <code>async def</code>...</summary>
    
    Se il tuo codice usa `async` / `await`, allora usa `async def`:
    
    ```Python hl_lines="7  12"
    from fastapi import FastAPI
    from typing import Optional
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Optional[str] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  9. docs/zh/docs/index.md

    ```
    
    <details markdown="1">
    <summary>ๆˆ–่€…ไฝฟ็”จ <code>async def</code>...</summary>
    
    ๅฆ‚ๆžœไฝ ็š„ไปฃ็ ้‡Œไผšๅ‡บ็Žฐ `async` / `await`๏ผŒ่ฏทไฝฟ็”จ `async def`๏ผš
    
    ```Python hl_lines="9  14"
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Union[str, None] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/first-steps.md

    In this case, it is an `async` function.
    
    ---
    
    You could also define it as a normal function instead of `async def`:
    
    ```Python hl_lines="7"
    {!../../../docs_src/first_steps/tutorial003.py!}
    ```
    
    !!! note
        If you don't know the difference, check the [Async: *"In a hurry?"*](../async.md#in-a-hurry){.internal-link target=_blank}.
    
    ### Step 5: return the content
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top