Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 43 of 43 for kwon (0.45 sec)

  1. docs/en/docs/tutorial/body.md

        Sending a body with a `GET` request has an undefined behavior in the specifications, nevertheless, it is supported by FastAPI, only for very complex/extreme use cases.
    
        As it is discouraged, the interactive docs with Swagger UI won't show the documentation for the body when using `GET`, and proxies in the middle might not support it.
    
    ## Import Pydantic's `BaseModel`
    
    First, you need to import `BaseModel` from `pydantic`:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  2. fastapi/routing.py

                Doc(
                    """
                    List of *path operations* that will be used as OpenAPI callbacks.
    
                    This is only for OpenAPI documentation, the callbacks won't be used
                    directly.
    
                    It will be added to the generated OpenAPI (e.g. visible at `/docs`).
    
                    Read more about it in the
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  3. docs/zh/docs/async.md

        return burgers
    ```
    
    使用 `async def`,Python 就知道在该函数中,它将遇上 `await`,并且它可以"暂停" ⏸ 执行该函数,直至执行其他操作 🔀 后回来。
    
    当你想调用一个 `async def` 函数时,你必须"等待"它。因此,这不会起作用:
    
    ```Python
    # This won't work, because get_burgers was defined with: async def
    burgers = get_burgers(2)
    ```
    
    ---
    
    因此,如果您使用的库告诉您可以使用 `await` 调用它,则需要使用 `async def` 创建路径操作函数 ,如:
    
    ```Python hl_lines="2-3"
    @app.get('/burgers')
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 21.1K bytes
    - Viewed (0)
Back to top