Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for 2022 (0.14 sec)

  1. fastapi/params.py

            examples: Optional[List[Any]] = None,
            example: Annotated[
                Optional[Any],
                deprecated(
                    "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
                    "although still supported. Use examples instead."
                ),
            ] = _Unset,
            openapi_examples: Optional[Dict[str, Example]] = None,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  2. docs_src/response_model/tutorial004.py

        price: float
        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
    async def read_item(item_id: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 633 bytes
    - Viewed (0)
  3. docs_src/body_updates/tutorial001_py39.py

        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 900 bytes
    - Viewed (0)
  4. docs_src/response_model/tutorial006.py

        description: Union[str, None] = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
            "description": "There goes my baz",
            "price": 50.2,
            "tax": 10.5,
        },
    }
    
    
    @app.get(
        "/items/{item_id}/name",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 848 bytes
    - Viewed (0)
  5. fastapi/param_functions.py

                """
            ),
        ] = None,
        example: Annotated[
            Optional[Any],
            deprecated(
                "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
                "although still supported. Use examples instead."
            ),
        ] = _Unset,
        openapi_examples: Annotated[
            Optional[Dict[str, Example]],
            Doc(
                """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/body-updates.md

    ```
    
    `PUT` 用于接收替换现有数据的数据。
    
    ### 关于更新数据的警告
    
    用 `PUT` 把数据项 `bar` 更新为以下内容时:
    
    ```Python
    {
        "name": "Barz",
        "price": 3,
        "description": None,
    }
    ```
    
    因为上述数据未包含已存储的属性 `"tax": 20.2`,新的输入模型会把 `"tax": 10.5` 作为默认值。
    
    因此,本次操作把 `tax` 的值「更新」为 `10.5`。
    
    ## 用 `PATCH` 进行部分更新
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/response-model.md

    #### 默认值字段有实际值的数据
    
    但是,如果你的数据在具有默认值的模型字段中有实际的值,例如 ID 为 `bar` 的项:
    
    ```Python hl_lines="3  5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    这些值将包含在响应中。
    
    #### 具有与默认值相同值的数据
    
    如果数据具有与默认值相同的值,例如 ID 为 `baz` 的项:
    
    ```Python hl_lines="3  5-6"
    {
        "name": "Baz",
        "description": None,
        "price": 50.2,
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/response-model.md

    #### デフォルト値を持つフィールドの値を持つデータ
    
    しかし、ID`bar`のitemのように、デフォルト値が設定されているモデルのフィールドに値が設定されている場合:
    
    ```Python hl_lines="3 5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    それらはレスポンスに含まれます。
    
    #### デフォルト値と同じ値を持つデータ
    
    ID`baz`のitemのようにデフォルト値と同じ値を持つデータの場合:
    
    ```Python hl_lines="3 5 6"
    {
        "name": "Baz",
        "description": None,
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/response-model.md

    But if your data has values for the model's fields with default values, like the item with ID `bar`:
    
    ```Python hl_lines="3  5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    they will be included in the response.
    
    #### Data with the same values as the defaults
    
    If the data has the same values as the default ones, like the item with ID `baz`:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  10. pyproject.toml

        # For passlib
        "ignore:'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning",
        # see https://trio.readthedocs.io/en/stable/history.html#trio-0-22-0-2022-09-28
        "ignore:You seem to already have a custom.*:RuntimeWarning:trio",
        "ignore::trio.TrioDeprecationWarning",
        # TODO remove pytest-cov
        'ignore::pytest.PytestDeprecationWarning:pytest_cov',
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:28:39 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top