Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for 17 (0.18 sec)

  1. docs/en/docs/advanced/dataclasses.md

    But FastAPI also supports using <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> the same way:
    
    ```Python hl_lines="1  7-12  19-20"
    {!../../../docs_src/dataclasses/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K 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 "提示"
    
        注意,本例除了声明请求参数之外,还声明了路径参数。
    
    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/ko/docs/tutorial/dependencies/classes-as-dependencies.md

    이제 아래의 클래스를 이용해서 의존성을 정의할 수 있습니다.
    
    === "파이썬 3.6 이상"
    
        ```Python hl_lines="19"
        {!> ../../../docs_src/dependencies/tutorial002.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
        ```
    
    **FastAPI**는 `CommonQueryParams` 클래스를 호출합니다. 이것은 해당 클래스의 "인스턴스"를 생성하고 그 인스턴스는 함수의 매개변수 `commons`로 전달됩니다.
    
    ## 타입 힌팅 vs `Depends`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

        ```Python hl_lines="18"
        {!> ../../../docs_src/dependencies/tutorial006_an.py!}
        ```
    
    === "Python 3.8 Annotated가 없는 경우"
    
        !!! tip "팁"
            가능하다면 `Annotated`가 달린 버전을 권장합니다.
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/dependencies/tutorial006.py!}
        ```
    
    이러한 의존성들은 기존 의존성들과 같은 방식으로 실행/해결됩니다. 그러나 값은 (무엇이든 반환한다면) *경로 작동 함수*에 제공되지 않습니다.
    
    !!! tip "팁"
        일부 편집기에서는 사용되지 않는 함수 매개변수를 검사하고 오류로 표시합니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:49:45 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/path-operation-advanced-configuration.md

    &amp; 👆 💪 👉 🚥 💽 🆎 📨 🚫 🎻.
    
    🖼, 👉 🈸 👥 🚫 ⚙️ FastAPI 🛠️ 🛠️ ⚗ 🎻 🔗 ⚪️➡️ Pydantic 🏷 🚫 🏧 🔬 🎻. 👐, 👥 📣 📨 🎚 🆎 📁, 🚫 🎻:
    
    ```Python hl_lines="17-22  24"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
    ```
    
    👐, 👐 👥 🚫 ⚙️ 🔢 🛠️ 🛠️, 👥 ⚙️ Pydantic 🏷 ❎ 🏗 🎻 🔗 💽 👈 👥 💚 📨 📁.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/path-params.md

    The value of the *path parameter* will be an *enumeration member*.
    
    #### Compare *enumeration members*
    
    You can compare it with the *enumeration member* in your created enum `ModelName`:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Get the *enumeration value*
    
    You can get the actual value (a `str` in this case) using `model_name.value`, or in general, `your_enum_member.value`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/ko/docs/tutorial/body.md

    === "Python 3.10+"
    
        ```Python hl_lines="15-16"
        {!> ../../../docs_src/body/tutorial003_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="17-18"
        {!> ../../../docs_src/body/tutorial003.py!}
        ```
    
    ## 요청 본문 + 경로 + 쿼리 매개변수
    
    **본문**, **경로** 그리고 **쿼리** 매개변수 모두 동시에 선언할 수도 있습니다.
    
    **FastAPI**는 각각을 인지하고 데이터를 옳바른 위치에 가져올 것입니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/path-params.md

    Значение *параметра пути* будет *элементом перечисления*.
    
    #### Сравнение *элементов перечисления*
    
    Вы можете сравнить это значение с *элементом перечисления* класса `ModelName`:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Получение *значения перечисления*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/path-params.md

     API 文档会显示预定义*路径参数*的可用值:
    
    <img src="/img/tutorial/path-params/image03.png">
    
    ### 使用 Python _枚举类型_
    
    *路径参数*的值是枚举的元素。
    
    #### 比较*枚举元素*
    
    枚举类 `ModelName` 中的*枚举元素*支持比较操作:
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### 获取*枚举值*
    
    使用 `model_name.value` 或 `your_enum_member.value` 获取实际的值(本例中为**字符串**):
    
    ```Python hl_lines="20"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  10. docs/fr/docs/tutorial/path-params.md

    #### Comparer les *membres d'énumération*
    
    Vous pouvez comparer ce paramètre avec les membres de votre énumération `ModelName` :
    
    ```Python hl_lines="17"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Récupérer la *valeur de l'énumération*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
Back to top