Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 131 for using (0.21 sec)

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

    # Using the Request Directly
    
    Up to now, you have been declaring the parts of the request that you need with their types.
    
    Taking data from:
    
    * The path as parameters.
    * Headers.
    * Cookies.
    * etc.
    
    And by doing so, **FastAPI** is validating that data, converting it and generating documentation for your API automatically.
    
    But there are situations where you might need to access the `Request` object directly.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 2.3K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/using-request-directly.md

    不过,仍可以验证、转换与注释(使用 Pydantic 模型的请求体等)其它正常声明的参数。
    
    但在某些特定情况下,还是需要提取 `Request` 对象。
    
    ## 直接使用 `Request` 对象
    
    假设要在*路径操作函数*中获取客户端 IP 地址和主机。
    
    此时,需要直接访问请求。
    
    ```Python hl_lines="1  7-8"
    {!../../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    把*路径操作函数*的参数类型声明为 `Request`,**FastAPI** 就能把 `Request` 传递到参数里。
    
    !!! tip "提示"
    
        注意,本例除了声明请求参数之外,还声明了路径参数。
    
        因此,能够提取、验证路径参数、并转换为指定类型,还可以用 OpenAPI 注释。
    
    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)
  3. docs/de/docs/advanced/using-request-directly.md

    Angenommen, Sie möchten auf die IP-Adresse/den Host des Clients in Ihrer *Pfadoperation-Funktion* zugreifen.
    
    Dazu müssen Sie direkt auf den Request zugreifen.
    
    ```Python hl_lines="1  7-8"
    {!../../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    Durch die Deklaration eines *Pfadoperation-Funktionsparameters*, dessen Typ der `Request` ist, weiß **FastAPI**, dass es den `Request` diesem Parameter übergeben soll.
    
    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:18:32 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/using-request-directly.md

    ✋️ 📤 🎯 💼 🌐❔ ⚫️ ⚠ 🤚 `Request` 🎚.
    
    ## ⚙️ `Request` 🎚 🔗
    
    ➡️ 🌈 👆 💚 🤚 👩‍💻 📢 📢/🦠 🔘 👆 *➡ 🛠️ 🔢*.
    
    👈 👆 💪 🔐 📨 🔗.
    
    ```Python hl_lines="1  7-8"
    {!../../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    📣 *➡ 🛠️ 🔢* 🔢 ⏮️ 🆎 ➖ `Request` **FastAPI** 🔜 💭 🚶‍♀️ `Request` 👈 🔢.
    
    !!! tip
        🗒 👈 👉 💼, 👥 📣 ➡ 🔢 ⤴️ 📨 🔢.
    
        , ➡ 🔢 🔜 ⚗, ✔, 🗜 ✔ 🆎 & ✍ ⏮️ 🗄.
    
    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)
  5. .github/actions/comment-docs-preview-in-pr/action.yml

    author: Sebastián Ramírez <******@****.***>
    inputs:
      token:
        description: Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}
        required: true
      deploy_url:
        description: The deployment URL to comment in the PR
        required: true
    runs:
      using: docker
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 25 17:54:36 GMT 2020
    - 394 bytes
    - Viewed (0)
  6. docs/en/docs/history-design-future.md

    But at some point, there was no other option than creating something that provided all these features, taking the best ideas from previous tools, and combining them in the best way possible, using language features that weren't even available before (Python 3.6+ type hints).
    
    </blockquote>
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/async-tests.md

    # Async Tests
    
    You have already seen how to test your **FastAPI** applications using the provided `TestClient`. Up to now, you have only seen how to write synchronous tests, without using `async` functions.
    
    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)
  8. docs/en/docs/tutorial/request-files.md

        This is not a limitation of **FastAPI**, it's part of the HTTP protocol.
    
    ## Optional File Upload
    
    You can make a file optional by using standard type annotations and setting a default value of `None`:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. docs/en/docs/project-generation.md

        - 💾 [PostgreSQL](https://www.postgresql.org) as the SQL database.
    - 🚀 [React](https://react.dev) for the frontend.
        - 💃 Using TypeScript, hooks, Vite, and other parts of a modern frontend stack.
        - 🎨 [Chakra UI](https://chakra-ui.com) for the frontend components.
        - 🤖 An automatically generated frontend client.
        - 🦇 Dark mode support.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 21 21:12:21 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. docs/en/data/external_links.yml

        link: https://www.analyticsvidhya.com/blog/2021/06/deploying-ml-models-as-api-using-fastapi-and-heroku/
        title: Deploying ML Models as API Using FastAPI and Heroku
      - link: https://jarmos.netlify.app/posts/using-github-actions-to-deploy-a-fastapi-project-to-heroku/
        title: Using GitHub Actions to Deploy a FastAPI Project to Heroku
        author_link: https://jarmos.netlify.app/
        author: Somraj Saha
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 21 20:57:27 GMT 2024
    - 21.3K bytes
    - Viewed (2)
Back to top