Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 465 for tipy (0.24 sec)

  1. docs/zh/docs/advanced/using-request-directly.md

    假设要在*路径操作函数*中获取客户端 IP 地址和主机。
    
    此时,需要直接访问请求。
    
    ```Python hl_lines="1  7-8"
    {!../../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    把*路径操作函数*的参数类型声明为 `Request`,**FastAPI** 就能把 `Request` 传递到参数里。
    
    !!! tip "提示"
    
        注意,本例除了声明请求参数之外,还声明了路径参数。
    
        因此,能够提取、验证路径参数、并转换为指定类型,还可以用 OpenAPI 注释。
    
        同样,您也可以正常声明其它参数,而且还可以提取 `Request`。
    
    ## `Request` 文档
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:44:02 GMT 2024
    - 2K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/advanced-dependencies.md

    处理依赖项时,**FastAPI** 以如下方式调用 `checker`:
    
    ```Python
    checker(q="somequery")
    ```
    
    ……并用*路径操作函数*的参数 `fixed_content_included` 返回依赖项的值:
    
    ```Python hl_lines="20"
    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    !!! tip "提示"
    
        本章示例有些刻意,也看不出有什么用处。
    
        这个简例只是为了说明高级依赖项的运作机制。
    
        在有关安全的章节中,工具函数将以这种方式实现。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 18:26:57 GMT 2024
    - 2K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/response-cookies.md

    👈, 👆 💪 ✍ 📨 🔬 [📨 📨 🔗](response-directly.md){.internal-link target=_blank}.
    
    ⤴️ ⚒ 🍪 ⚫️, & ⤴️ 📨 ⚫️:
    
    ```Python hl_lines="10-12"
    {!../../../docs_src/response_cookies/tutorial001.py!}
    ```
    
    !!! tip
        ✔️ 🤯 👈 🚥 👆 📨 📨 🔗 ↩️ ⚙️ `Response` 🔢, FastAPI 🔜 📨 ⚫️ 🔗.
    
        , 👆 🔜 ✔️ ⚒ 💭 👆 💽 ☑ 🆎. 🤶 Ⓜ. ⚫️ 🔗 ⏮️ 🎻, 🚥 👆 🛬 `JSONResponse`.
    
         & 👈 👆 🚫 📨 🙆 📊 👈 🔜 ✔️ ⛽ `response_model`.
    
    ### 🌅 ℹ
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  4. docs/pl/docs/index.md

    * Alternatywna dokumentacja również pokaże zaktualizowane parametry i treść żądania (body):
    
    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-06-redoc-02.png)
    
    ### Podsumowanie
    
    Podsumowując, musiałeś zadeklarować typy parametrów, treści żądania (body) itp. tylko **raz**, i są one dostępne jako parametry funkcji.
    
    Robisz to tak samo jak ze standardowymi typami w Pythonie.
    
    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)
  5. docs/en/docs/tutorial/middleware.md

    * You can then modify further the `response` before returning it.
    
    ```Python hl_lines="8-9  11  14"
    {!../../../docs_src/middleware/tutorial001.py!}
    ```
    
    !!! tip
        Keep in mind that custom proprietary headers can be added <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">using the 'X-' prefix</a>.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    ⚫️ 🔜 `list` `Depends()`:
    
    ```Python hl_lines="17"
    {!../../../docs_src/dependencies/tutorial006.py!}
    ```
    
    👉 🔗 🔜 🛠️/❎ 🎏 🌌 😐 🔗. ✋️ 👫 💲 (🚥 👫 📨 🙆) 🏆 🚫 🚶‍♀️ 👆 *➡ 🛠️ 🔢*.
    
    !!! tip
        👨‍🎨 ✅ ♻ 🔢 🔢, &amp; 🎦 👫 ❌.
    
        ⚙️ 👉 `dependencies` *➡ 🛠️ 👨‍🎨* 👆 💪 ⚒ 💭 👫 🛠️ ⏪ ❎ 👨‍🎨/🏭 ❌.
    
        ⚫️ 💪 ℹ ❎ 😨 🆕 👩‍💻 👈 👀 ♻ 🔢 👆 📟 &amp; 💪 💭 ⚫️ 🙃.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  7. docs/pt/docs/deployment/https.md

    # Sobre HTTPS
    
    É fácil assumir que HTTPS é algo que é apenas "habilitado" ou não.
    
    Mas é bem mais complexo do que isso.
    
    !!! tip "Dica"
        Se você está com pressa ou não se importa, continue com as seções seguintes para instruções passo a passo para configurar tudo com diferentes técnicas.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 05 10:40:05 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/advanced-dependencies.md

    ```Python
    checker(q="somequery")
    ```
    
    ...&amp; 🚶‍♀️ ⚫️❔ 👈 📨 💲 🔗 👆 *➡ 🛠️ 🔢* 🔢 `fixed_content_included`:
    
    ```Python hl_lines="20"
    {!../../../docs_src/dependencies/tutorial011.py!}
    ```
    
    !!! tip
        🌐 👉 💪 😑 🎭. &amp; ⚫️ 💪 🚫 📶 🆑 ❔ ⚫️ ⚠.
    
        👫 🖼 😫 🙅, ✋️ 🎦 ❔ ⚫️ 🌐 👷.
    
        📃 🔃 💂‍♂, 📤 🚙 🔢 👈 🛠️ 👉 🎏 🌌.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/middleware.md

        * 这个函数将 `request` 传递给相应的 *路径操作*.
        * 然后它将返回由相应的*路径操作*生成的 `response`.
    * 然后你可以在返回 `response` 前进一步修改它.
    
    ```Python hl_lines="8-9  11  14"
    {!../../../docs_src/middleware/tutorial001.py!}
    ```
    
    !!! tip
        请记住可以 <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">用'X-' 前缀</a>添加专有自定义请求头.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 27 17:25:21 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/response-directly.md

    但是你可以在你的 *路径操作* 中直接返回一个 `JSONResponse`。
    
    直接返回响应可能会有用处,比如返回自定义的响应头和 cookies。
    
    ## 返回 `Response`
    
    事实上,你可以返回任意 `Response` 或者任意 `Response` 的子类。
    
    !!! tip "小贴士"
        `JSONResponse` 本身是一个 `Response` 的子类。
    
    当你返回一个 `Response` 时,**FastAPI** 会直接传递它。
    
    **FastAPI** 不会用 Pydantic 模型做任何数据转换,不会将响应内容转换成任何类型,等等。
    
    这种特性给你极大的可扩展性。你可以返回任何数据类型,重写任何数据声明或者校验,等等。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 3.1K bytes
    - Viewed (0)
Back to top