Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 102 for guid (0.17 sec)

  1. docs/zh/docs/advanced/response-directly.md

    这种特性给你极大的可扩展性。你可以返回任何数据类型,重写任何数据声明或者校验,等等。
    
    ## 在 `Response` 中使用 `jsonable_encoder`
    
    由于 **FastAPI** 并未对你返回的 `Response` 做任何改变,你必须确保你已经准备好响应内容。
    
    例如,如果不首先将 Pydantic 模型转换为 `dict`,并将所有数据类型(如 `datetime`、`UUID` 等)转换为兼容 JSON 的类型,则不能将其放入JSONResponse中。
    
    对于这些情况,在将数据传递给响应之前,你可以使用 `jsonable_encoder` 来转换你的数据。
    
    
    ```Python hl_lines="4 6 20 21"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "技术细节"
    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)
  2. docs/ja/docs/advanced/response-directly.md

    ## `jsonable_encoder` を `Response` の中で使う
    
    **FastAPI** はあなたが返す `Response` に対して何も変更を加えないので、コンテンツが準備できていることを保証しなければなりません。
    
    例えば、Pydanticモデルを `JSONResponse` に含めるには、すべてのデータ型 (`datetime` や `UUID` など) をJSON互換の型に変換された `dict` に変換しなければなりません。
    
    このようなケースでは、レスポンスにデータを含める前に `jsonable_encoder` を使ってデータを変換できます。
    
    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "技術詳細"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Nov 05 22:50:38 GMT 2020
    - 3.6K bytes
    - Viewed (0)
  3. docs/en/docs/img/deployment/https/https01.drawio

    <mxfile host="65bd71144e">
        <diagram id="jyERGzDynktFHFRGN0ph" name="Page-1">
            <mxGraphModel dx="2738" dy="2173" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1920" pageHeight="1200" math="0" shadow="0">
                <root>
                    <mxCell id="0"/>
                    <mxCell id="1" parent="0"/>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.2K bytes
    - Viewed (0)
  4. docs/fr/docs/deployment/docker.md

    d'un serveur à 5 USD/mois) et ensuite vous pouvez vous développer autant que vous le souhaitez en ajoutant d'autres serveurs.
    
    Pour configurer un cluster en mode Docker Swarm avec Traefik et la gestion de HTTPS, suivez ce guide :
    
    ### <a href="https://medium.com/@tiangolo/docker-swarm-mode-and-traefik-for-a-https-cluster-20328dba6232" class="external-link" target="_blank">Docker Swarm Mode et Traefik pour un cluster HTTPS</a>
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  5. docs/vi/docs/features.md

        * Xâu (`str`), định nghĩa độ dài lớn nhất, nhỏ nhất.
        * Số (`int`, `float`) với các giá trị lớn nhất, nhỏ nhất, etc.
    
    * Validation cho nhiều kiểu dữ liệu bên ngoài như:
        * URL.
        * Email.
        * UUID.
        * ...và nhiều cái khác.
    
    Tất cả validation được xử lí bằng những thiết lập tốt và mạnh mẽ của **Pydantic**.
    
    ### Bảo mật và xác thực
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. docs/uk/docs/python-types.md

    **FastAPI** повністю базується на Pydantic.
    
    Ви побачите набагато більше цього всього на практиці в [Tutorial - User Guide](tutorial/index.md){.internal-link target=_blank}.
    
    ## Анотації типів у **FastAPI**
    
    **FastAPI** використовує ці підказки для виконання кількох речей.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  7. docs/ru/docs/index.md

        * Преобразование типов Python (`str`, `int`, `float`, `bool`, `list`, и т.д.).
        * Объекты `datetime`.
        * Объекты `UUID`.
        * Модели баз данных.
        * ...и многое другое.
    * Автоматическая интерактивная документация по API, включая 2 альтернативных пользовательских интерфейса:
        * Swagger UI.
        * ReDoc.
    
    ---
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  8. docs/zh/docs/index.md

        * Cookies
        * 请求头
        * 表单
        * 文件
    * <abbr title="也被称为:序列化或解析">转换</abbr> 输出的数据:转换 Python 数据类型为供网络传输的 JSON 数据:
        * 转换 Python 基础类型 (`str`、 `int`、 `float`、 `bool`、 `list` 等)
        * `datetime` 对象
        * `UUID` 对象
        * 数据库模型
        * ......以及更多其他类型
    * 自动生成的交互式 API 文档,包括两种可选的用户界面:
        * Swagger UI
        * ReDoc
    
    ---
    
    回到前面的代码示例,**FastAPI** 将会:
    
    * 校验 `GET` 和 `PUT` 请求的路径中是否含有 `item_id`。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  9. docs_src/extra_data_types/tutorial001.py

    from datetime import datetime, time, timedelta
    from typing import Union
    from uuid import UUID
    
    from fastapi import Body, FastAPI
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def read_items(
        item_id: UUID,
        start_datetime: datetime = Body(),
        end_datetime: datetime = Body(),
        process_after: timedelta = Body(),
        repeat_at: Union[time, None] = Body(default=None),
    ):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 755 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py310.py

                                "required": True,
                                "schema": {
                                    "title": "Item Id",
                                    "type": "string",
                                    "format": "uuid",
                                },
                                "name": "item_id",
                                "in": "path",
                            }
                        ],
                        "requestBody": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top