Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for asynchronously (0.41 sec)

  1. docs/en/docs/advanced/async-tests.md

    Let's look at how we can make that work.
    
    ## pytest.mark.anyio
    
    If we want to call asynchronous functions in our tests, our test functions have to be asynchronous. AnyIO provides a neat plugin for this, that allows us to specify that some test functions are to be called asynchronously.
    
    ## HTTPX
    
    Even if your **FastAPI** application uses normal `def` functions instead of `async def`, it is still an `async` application underneath.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 12:07:15 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    !!! tip
        Notice that here as we are using standard `open()` that doesn't support `async` and `await`, we declare the path operation with normal `def`.
    
    ### `FileResponse`
    
    Asynchronously streams a file as the response.
    
    Takes a different set of arguments to instantiate than the other response types:
    
    * `path` - The filepath to the file to stream.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. tests/test_dependency_class.py

    ):
        return value
    
    
    @app.get("/asynchronous-method-dependency")
    async def get_asynchronous_method_dependency(
        value: str = Depends(methods_dependency.asynchronous),
    ):
        return value
    
    
    @app.get("/asynchronous-method-gen-dependency")
    async def get_asynchronous_method_gen_dependency(
        value: str = Depends(methods_dependency.asynchronous_gen),
    ):
        return value
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 10:54:05 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  4. docs/en/docs/async.md

    * **Asynchronous Code**
    * **`async` and `await`**
    * **Coroutines**
    
    ## Asynchronous Code
    
    Asynchronous code just means that the language ๐Ÿ’ฌ has a way to tell the computer / program ๐Ÿค– that at some point in the code, it ๐Ÿค– will have to wait for *something else* to finish somewhere else. Let's say that *something else* is called "slow-file" ๐Ÿ“.
    
    So, during that time, the computer can go and do some other work, while "slow-file" ๐Ÿ“ finishes.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/middleware.md

    In this section we'll see how to use other middlewares.
    
    ## Adding ASGI middlewares
    
    As **FastAPI** is based on Starlette and implements the <abbr title="Asynchronous Server Gateway Interface">ASGI</abbr> specification, you can use any ASGI middleware.
    
    A middleware doesn't have to be made for FastAPI or Starlette to work, as long as it follows the ASGI spec.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  6. 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)
  7. docs/en/docs/alternatives.md

    ### <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a>
    
    Starlette is a lightweight <abbr title="The new standard for building asynchronous Python web applications">ASGI</abbr> framework/toolkit, which is ideal for building high-performance asyncio services.
    
    It is very simple and intuitive. It's designed to be easily extensible, and have modular components.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  8. docs/en/docs/deployment/manually.md

    ## ASGI Servers
    
    Let's go a little deeper into the details.
    
    FastAPI uses a standard for building Python web frameworks and servers called <abbr title="Asynchronous Server Gateway Interface">ASGI</abbr>. FastAPI is an ASGI web framework.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  9. docs/em/docs/alternatives.md

        **FastAPI** โคด๏ธ โœŠ ๐Ÿ‘ˆ ๐ŸŽป ๐Ÿ”— ๐Ÿ’ฝ &amp; ๐Ÿšฎ โšซ๏ธ ๐Ÿ—„, โ†–๏ธ โšช๏ธโžก๏ธ ๐ŸŒ ๐ŸŽ ๐Ÿ‘œ โšซ๏ธ ๐Ÿ”จ.
    
    ### <a href="https://www.starlette.io/" class="external-link" target="_blank">๐Ÿ’ƒ</a>
    
    ๐Ÿ’ƒ ๐Ÿ’ฟ <abbr title="The new standard for building asynchronous Python web">๐Ÿ”ซ</abbr> ๐Ÿ› ๏ธ/๐Ÿงฐ, โ” ๐Ÿ’ฏ ๐Ÿ— โ†•-๐ŸŽญ โœณ ๐Ÿ•โ€๐Ÿฆบ.
    
    โšซ๏ธ ๐Ÿ“ถ ๐Ÿ™… &amp; ๐Ÿ‹๏ธ. โšซ๏ธ ๐Ÿ”ง ๐Ÿ’ช ๐Ÿง, &amp; โœ”๏ธ ๐Ÿ”ง ๐Ÿฆฒ.
    
    โšซ๏ธ โœ”๏ธ:
    
    * ๐Ÿค™ ๐ŸŽ† ๐ŸŽญ.
    *  *๏ธโƒฃ ๐Ÿ•โ€๐Ÿฆบ.
    * -๐Ÿ› ๏ธ ๐Ÿ–ฅ ๐Ÿ“‹.
    * ๐Ÿ•ด &amp; ๐Ÿคซ ๐ŸŽ‰.
    * ๐Ÿ’ฏ ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ— ๐Ÿ”› ๐Ÿ‡ธ๐Ÿ‡ฒ.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  10. docs/ja/docs/async.md

    # ไธฆ่กŒๅ‡ฆ็†ใจ async / await
    
    *path operation ้–ขๆ•ฐ*ใฎใŸใ‚ใฎ `async def` ใซ้–ขใ™ใ‚‹่ฉณ็ดฐใจ้žๅŒๆœŸ (asynchronous) ใ‚ณใƒผใƒ‰ใ€ไธฆ่กŒๅ‡ฆ็† (Concurrency)ใ€ใใ—ใฆใ€ไธฆๅˆ—ๅ‡ฆ็† (Parallelism) ใฎ่ƒŒๆ™ฏใซใคใ„ใฆใ€‚
    
    ## ๆ€ฅใ„ใงใ„ใพใ™ใ‹๏ผŸ
    
    <abbr title="too long; didn't read (้•ทใ™ใŽใฆ่ชญใ‚ใชใ„ไบบใฎใŸใ‚ใฎ่ฆ็ด„ใจใ„ใ†ๆ„ๅ‘ณใฎใ‚นใƒฉใƒณใ‚ฐ)"><strong>TL;DR:</strong></abbr>
    
    ๆฌกใฎใ‚ˆใ†ใชใ€`await` ใ‚’ไฝฟ็”จใ—ใฆๅ‘ผใณๅ‡บใ™ในใใ‚ตใƒผใƒ‰ใƒ‘ใƒผใƒ†ใ‚ฃใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ไฝฟ็”จใ—ใฆใ„ใ‚‹ๅ ดๅˆ:
    
    ```Python
    results = await some_library()
    ```
    
    ไปฅไธ‹ใฎๆง˜ใซ `async def` ใ‚’ไฝฟ็”จใ—ใฆ*path operation ้–ขๆ•ฐ*ใ‚’ๅฎฃ่จ€ใ—ใพใ™ใ€‚
    
    ```Python hl_lines="2"
    @app.get('/')
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 27.8K bytes
    - Viewed (0)
Back to top