Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 91 for Model (0.13 sec)

  1. docs/em/docs/advanced/path-operation-advanced-configuration.md

    ⚫️ 🏆 🚫 🎦 🆙 🧾, ✋️ 🎏 🧰 (✅ 🐉) 🔜 💪 ⚙️ 🎂.
    
    ```Python hl_lines="19-29"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial004.py!}
    ```
    
    ## 🌖 📨
    
    👆 🎲 ✔️ 👀 ❔ 📣 `response_model` & `status_code` *➡ 🛠️*.
    
    👈 🔬 🗃 🔃 👑 📨 *➡ 🛠️*.
    
    👆 💪 📣 🌖 📨 ⏮️ 👫 🏷, 👔 📟, ♒️.
    
    📤 🎂 📃 📥 🧾 🔃 ⚫️, 👆 💪 ✍ ⚫️ [🌖 📨 🗄](additional-responses.md){.internal-link target=_blank}.
    
    ## 🗄 ➕
    
    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)
  2. docs/en/docs/release-notes.md

    * Fix type declaration of `response_model` to allow generic Python types as `List[Model]`. Mainly to fix `mypy` for users. PR [#266](https://github.com/tiangolo/fastapi/pull/266).
    
    ## 0.25.0
    
    * Add support for Pydantic's `include`, `exclude`, `by_alias`.
        * Update documentation: [Response Model](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  3. docs/en/docs/alternatives.md

    !!! check "Inspired **FastAPI** to"
        Define extra validations for data types using the "default" value of model attributes. This improves editor support, and it was not available in Pydantic before.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/body.md

    <img src="/img/tutorial/body/image01.png">
    
    이를 필요로 하는 각각의 *경로 작동*내부의 API 문서에도 사용됩니다:
    
    <img src="/img/tutorial/body/image02.png">
    
    ## 편집기 지원
    
    편집기에서, 함수 내에서 타입 힌트와 완성을 어디서나 (만약 Pydantic model 대신에 `dict`을 받을 경우 나타나지 않을 수 있습니다) 받을 수 있습니다:
    
    <img src="/img/tutorial/body/image03.png">
    
    잘못된 타입 연산에 대한 에러 확인도 받을 수 있습니다:
    
    <img src="/img/tutorial/body/image04.png">
    
    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)
  5. docs/zh/docs/tutorial/handling-errors.md

    `RequestValidationError` 是 Pydantic 的 <a href="https://docs.pydantic.dev/latest/concepts/models/#error-handling" class="external-link" target="_blank">`ValidationError`</a> 的子类。
    
    **FastAPI** 调用的就是 `RequestValidationError` 类,因此,如果在 `response_model` 中使用 Pydantic 模型,且数据有错误时,在日志中就会看到这个错误。
    
    但客户端或用户看不到这个错误。反之,客户端接收到的是 HTTP 状态码为 `500` 的「内部服务器错误」。
    
    这是因为在*响应*或代码(不是在客户端的请求里)中出现的 Pydantic `ValidationError` 是代码的 bug。
    
    修复错误时,客户端或用户不能访问错误的内部信息,否则会造成安全隐患。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/sql-databases.md

    这样,而不是仅仅试图从`dict`上 `id` 中获取值,如下所示:
    
    ```Python
    id = data["id"]
    ```
    
    尝试从属性中获取它,如:
    
    ```Python
    id = data.id
    ```
    
    有了这个,Pydantic*模型*与 ORM 兼容,您只需在*路径操作*`response_model`的参数中声明它即可。
    
    您将能够返回一个数据库模型,它将从中读取数据。
    
    #### ORM 模式的技术细节
    
    SQLAlchemy 和许多其他默认情况下是“延迟加载”。
    
    这意味着,例如,除非您尝试访问包含该数据的属性,否则它们不会从数据库中获取关系数据。
    
    例如,访问属性`items`:
    
    ```Python
    current_user.items
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  7. docs/zh/docs/how-to/general.md

    # 通用 - 如何操作 - 诀窍
    
    这里是一些指向文档中其他部分的链接,用于解答一般性或常见问题。
    
    ## 数据过滤 - 安全性
    
    为确保不返回超过需要的数据,请阅读 [教程 - 响应模型 - 返回类型](../tutorial/response-model.md){.internal-link target=_blank} 文档。
    
    ## 文档的标签 - OpenAPI
    
    在文档界面中添加**路径操作**的标签和进行分组,请阅读 [教程 - 路径操作配置 - Tags 参数](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank} 文档。
    
    ## 文档的概要和描述 - OpenAPI
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 22 23:41:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/oauth2-jwt.md

    Many packages that simplify it a lot have to make many compromises with the data model, database, and available features. And some of these packages that simplify things too much actually have security flaws underneath.
    
    ---
    
    **FastAPI** doesn't make any compromise with any database, data model or tool.
    
    It gives you all the flexibility to choose the ones that fit your project the best.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/openapi-callbacks.md

    ```
    
    ### ✍ ⏲ *➡ 🛠️*
    
    ✍ ⏲ *➡ 🛠️* ⚙️ 🎏 `APIRouter` 👆 ✍ 🔛.
    
    ⚫️ 🔜 👀 💖 😐 FastAPI *➡ 🛠️*:
    
    * ⚫️ 🔜 🎲 ✔️ 📄 💪 ⚫️ 🔜 📨, ✅ `body: InvoiceEvent`.
    *  &amp; ⚫️ 💪 ✔️ 📄 📨 ⚫️ 🔜 📨, ✅ `response_model=InvoiceEventReceived`.
    
    ```Python hl_lines="16-18  21-22  28-32"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    📤 2️⃣ 👑 🔺 ⚪️➡️ 😐 *➡ 🛠️*:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/generate-clients.md

    <img src="/img/tutorial/generate-clients/image03.png">
    
    !!! tip
        Notice the autocompletion for `name` and `price`, that was defined in the FastAPI application, in the `Item` model.
    
    You will have inline errors for the data that you send:
    
    <img src="/img/tutorial/generate-clients/image04.png">
    
    The response object will also have autocompletion:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top