Search Options

Results per page
Sort
Preferred Languages
Advance

Results 821 - 830 of 849 for Pydantics (0.13 sec)

  1. docs/de/docs/advanced/custom-response.md

    Und wenn diese `Response` einen JSON-Medientyp (`application/json`) hat, wie es bei `JSONResponse` und `UJSONResponse` der Fall ist, werden die von Ihnen zurückgegebenen Daten automatisch mit jedem Pydantic `response_model` konvertiert (und gefiltert), das Sie im *Pfadoperation-Dekorator* deklariert haben.
    
    /// note | "Hinweis"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/security/simple-oauth2.md

    如果不存在指定用户,则返回错误消息,提示**用户名或密码错误**。
    
    本例使用 `HTTPException` 异常显示此错误:
    
    ```Python hl_lines="3  77-79"
    {!../../docs_src/security/tutorial003.py!}
    ```
    
    ### 校验密码
    
    至此,我们已经从数据库中获取了用户数据,但尚未校验密码。
    
    接下来,首先将数据放入 Pydantic 的 `UserInDB` 模型。
    
    注意:永远不要保存明文密码,本例暂时先使用(伪)哈希密码系统。
    
    如果密码不匹配,则返回与上面相同的错误。
    
    #### 密码哈希
    
    **哈希**是指,将指定内容(本例中为密码)转换为形似乱码的字节序列(其实就是字符串)。
    
    每次传入完全相同的内容(比如,完全相同的密码)时,得到的都是完全相同的乱码。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  3. docs/uk/docs/tutorial/first-steps.md

    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Ви можете повернути `dict`, `list`, а також окремі значення `str`, `int`, ітд.
    
    Також можна повернути моделі Pydantic (про це ви дізнаєтесь пізніше).
    
    Існує багато інших об'єктів і моделей, які будуть автоматично конвертовані в JSON (зокрема ORM тощо). Спробуйте використати свої улюблені, велика ймовірність, що вони вже підтримуються.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/request-files.md

    /// note |  "`async` 기술적 세부사항"
    
    `async` 메소드들을 사용할 때 **FastAPI**는 스레드풀에서 파일 메소드들을 실행하고 그들을 기다립니다.
    
    ///
    
    /// note | "Starlette 기술적 세부사항"
    
    **FastAPI**의 `UploadFile` 은 **Starlette**의 `UploadFile` 을 직접적으로 상속받지만, **Pydantic** 및 FastAPI의 다른 부분들과의 호환성을 위해 필요한 부분들이 추가되었습니다.
    
    ///
    
    ## "폼 데이터"란
    
    HTML의 폼들(`<form></form>`)이 서버에 데이터를 전송하는 방식은 대개 데이터에 JSON과는 다른 "특별한" 인코딩을 사용합니다.
    
    **FastAPI**는 JSON 대신 올바른 위치에서 데이터를 읽을 수 있도록 합니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/first-steps.md

    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Sie können ein `dict`, eine `list`, einzelne Werte wie `str`, `int`, usw. zurückgeben.
    
    Sie können auch Pydantic-Modelle zurückgeben (dazu später mehr).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/custom-response.md

    🎚 👈 👆 📨 ⚪️➡️ 👆 *➡ 🛠️ 🔢* 🔜 🚮 🔘 👈 `Response`.
    
    &amp; 🚥 👈 `Response` ✔️ 🎻 📻 🆎 (`application/json`), 💖 💼 ⏮️ `JSONResponse` &amp; `UJSONResponse`, 💽 👆 📨 🔜 🔁 🗜 (&amp; ⛽) ⏮️ 🙆 Pydantic `response_model` 👈 👆 📣 *➡ 🛠️ 👨‍🎨*.
    
    /// note
    
    🚥 👆 ⚙️ 📨 🎓 ⏮️ 🙅‍♂ 📻 🆎, FastAPI 🔜 ⌛ 👆 📨 ✔️ 🙅‍♂ 🎚, ⚫️ 🔜 🚫 📄 📨 📁 🚮 🏗 🗄 🩺.
    
    ///
    
    ## ⚙️ `ORJSONResponse`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  7. tests/test_generate_unique_id_function.py

    import warnings
    from typing import List
    
    from fastapi import APIRouter, FastAPI
    from fastapi.routing import APIRoute
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"foo_{route.name}"
    
    
    def custom_generate_unique_id2(route: APIRoute):
        return f"bar_{route.name}"
    
    
    def custom_generate_unique_id3(route: APIRoute):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jan 13 15:10:26 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/custom-response.md

    And if that `Response` has a JSON media type (`application/json`), like is the case with the `JSONResponse` and `UJSONResponse`, the data you return will be automatically converted (and filtered) with any Pydantic `response_model` that you declared in the *path operation decorator*.
    
    /// note
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/security/oauth2-jwt.md

    Create a variable `ALGORITHM` with the algorithm used to sign the JWT token and set it to `"HS256"`.
    
    Create a variable for the expiration of the token.
    
    Define a Pydantic Model that will be used in the token endpoint for the response.
    
    Create a utility function to generate a new access token.
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="4 7  13-15  29-31  79-87"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:45:10 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  10. docs/vi/docs/tutorial/first-steps.md

    ```Python hl_lines="8"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    Bạn có thể trả về một `dict`, `list`, một trong những giá trị đơn như `str`, `int`,...
    
    Bạn cũng có thể trả về Pydantic model (bạn sẽ thấy nhiều hơn về nó sau).
    
    Có nhiều object và model khác nhau sẽ được tự động chuyển đổi sang JSON (bao gồm cả ORM,...). Thử sử dụng loại ưa thích của bạn, nó có khả năng cao đã được hỗ trợ.
    
    ## Tóm lại
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top