Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for 58 (0.15 sec)

  1. docs/en/docs/how-to/async-sql-encode-databases.md

    ```Python hl_lines="42  45-47  50-52"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    ## Read notes
    
    Create the *path operation function* to read notes:
    
    ```Python hl_lines="55-58"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! note
        Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/security/simple-oauth2.md

    使之仅在当前用户为激活状态时,才能获取 `current_user`。
    
    为此,要再创建一个依赖项 `get_current_active_user`,此依赖项以 `get_current_user` 依赖项为基础。
    
    如果用户不存在,或状态为未激活,这两个依赖项都会返回 HTTP 错误。
    
    因此,在端点中,只有当用户存在、通过身份验证、且状态为激活时,才能获得该用户:
    
    ```Python hl_lines="58-67  69-72  90"
    {!../../../docs_src/security/tutorial003.py!}
    ```
    
    !!! info "说明"
    
        此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。
    
        任何 401**UNAUTHORIZED**HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/security/simple-oauth2.md

    👯‍♂️ 👉 🔗 🔜 📨 🇺🇸🔍 ❌ 🚥 👩‍💻 🚫 🔀, ⚖️ 🚥 🔕.
    
    , 👆 🔗, 👥 🔜 🕴 🤚 👩‍💻 🚥 👩‍💻 🔀, ☑ 🔓, & 🦁:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="58-66  69-72  90"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="55-64  67-70  88"
        {!> ../../../docs_src/security/tutorial003_py310.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/async-sql-databases.md

    * 创建 `FastAPI` 应用
    * 创建事件处理器,执行数据库连接与断开操作
    
    ```Python hl_lines="42  45-47  50-52"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    ## 读取笔记
    
    创建读取笔记的*路径操作函数*:
    
    ```Python hl_lines="55-58"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! Note "笔记"
    
        注意,本例与数据库通信时使用 `await`,因此*路径操作函数*要声明为异步函数(`asnyc`)。
    
    ### 注意 `response_model=List[Note]`
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:44:40 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/async-sql-databases.md

    * ✍ 🎉 🐕‍🦺 🔗 & 🔌 ⚪️➡️ 💽.
    
    ```Python hl_lines="42  45-47  50-52"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    ## ✍ 🗒
    
    ✍ *➡ 🛠️ 🔢* ✍ 🗒:
    
    ```Python hl_lines="55-58"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! Note
        👀 👈 👥 🔗 ⏮️ 💽 ⚙️ `await`, *➡ 🛠️ 🔢* 📣 ⏮️ `async`.
    
    ### 👀 `response_model=List[Note]`
    
    ⚫️ ⚙️ `typing.List`.
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4K bytes
    - Viewed (0)
  6. docs/ja/docs/advanced/websockets.md

    WebSocketエンドポイントでは、`fastapi` から以下をインポートして使用できます。
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    これらは、他のFastAPI エンドポイント/*path operation* の場合と同じように機能します。
    
    ```Python hl_lines="58-65  68-83"
    {!../../../docs_src/websockets/tutorial002.py!}
    ```
    
    !!! info "情報"
        WebSocket で `HTTPException` を発生させることはあまり意味がありません。したがって、WebSocketの接続を直接閉じる方がよいでしょう。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 13:58:31 GMT 2022
    - 7.2K bytes
    - Viewed (0)
Back to top