Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 36 of 36 for 2012 (0.25 sec)

  1. docs_src/response_model/tutorial004_py39.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 May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 627 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_response_model/test_tutorial004_py310.py

    @pytest.mark.parametrize(
        "url,data",
        [
            ("/items/foo", {"name": "Foo", "price": 50.2}),
            (
                "/items/bar",
                {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
            ),
            (
                "/items/baz",
                {
                    "name": "Baz",
                    "description": None,
                    "price": 50.2,
                    "tax": 10.5,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/body-updates.md

    ```Python
    {
        "name": "Barz",
        "price": 3,
        "description": None,
    }
    ```
    
    because it doesn't include the already stored attribute `"tax": 20.2`, the input model would take the default value of `"tax": 10.5`.
    
    And the data would be saved with that "new" `tax` of `10.5`.
    
    ## Partial updates with `PATCH`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/body-updates.md

    `PUT` โš™๏ธ ๐Ÿ“จ ๐Ÿ’ฝ ๐Ÿ‘ˆ ๐Ÿ”œ โŽ โ™ป ๐Ÿ’ฝ.
    
    ### โš  ๐Ÿ”ƒ โŽ
    
    ๐Ÿ‘ˆ โ›“ ๐Ÿ‘ˆ ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ’š โ„น ๐Ÿฌ `bar` โš™๏ธ `PUT` โฎ๏ธ ๐Ÿ’ช โš—:
    
    ```Python
    {
        "name": "Barz",
        "price": 3,
        "description": None,
    }
    ```
    
    โ†ฉ๏ธ โšซ๏ธ ๐Ÿšซ ๐Ÿ”Œ โช ๐Ÿช ๐Ÿ”ข `"tax": 20.2`, ๐Ÿ”ข ๐Ÿท ๐Ÿ”œ โœŠ ๐Ÿ”ข ๐Ÿ’ฒ `"tax": 10.5`.
    
    & ๐Ÿ“Š ๐Ÿ”œ ๐Ÿ–Š โฎ๏ธ ๐Ÿ‘ˆ "๐Ÿ†•" `tax` `10.5`.
    
    ## ๐Ÿ• โ„น โฎ๏ธ `PATCH`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/body-updates.md

    ๆ—ขๅญ˜ใฎใƒ‡ใƒผใ‚ฟใ‚’็ฝฎใๆ›ใˆใ‚‹ในใใƒ‡ใƒผใ‚ฟใ‚’ๅ—ใ‘ๅ–ใ‚‹ใŸใ‚ใซ`PUT`ใฏไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚
    
    ### ็ฝฎๆ›ใซใคใ„ใฆใฎๆณจๆ„
    
    ใคใพใ‚Šใ€`PUT`ใ‚’ไฝฟ็”จใ—ใฆไปฅไธ‹ใฎใƒœใƒ‡ใ‚ฃใง้ …็›ฎ`bar`ใ‚’ๆ›ดๆ–ฐใ—ใŸใ„ๅ ดๅˆใฏ:
    
    ```Python
    {
        "name": "Barz",
        "price": 3,
        "description": None,
    }
    ```
    
    ใ™ใงใซๆ ผ็ดใ•ใ‚Œใฆใ„ใ‚‹ๅฑžๆ€ง`"tax": 20.2`ใ‚’ๅซใพใชใ„ใŸใ‚ใ€ๅ…ฅๅŠ›ใƒขใƒ‡ใƒซใฎใƒ‡ใƒ•ใ‚ฉใƒซใƒˆๅ€คใฏ`"tax": 10.5`ใงใ™ใ€‚
    
    ใใ—ใฆใ€ใƒ‡ใƒผใ‚ฟใฏใใฎใ€Œๆ–ฐใ—ใ„ใ€`10.5`ใฎ`tax`ใจๅ…ฑใซไฟๅญ˜ใ•ใ‚Œใพใ™ใ€‚
    
    ## `PATCH`ใซใ‚ˆใ‚‹้ƒจๅˆ†็š„ใชๆ›ดๆ–ฐ
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/response-model.md

    #### ๊ธฐ๋ณธ๊ฐ’์ด ์žˆ๋Š” ํ•„๋“œ๋ฅผ ๊ฐ–๋Š” ๊ฐ’์˜ ๋ฐ์ดํ„ฐ
    
    ํ•˜์ง€๋งŒ ๋ชจ๋ธ์˜ ํ•„๋“œ๊ฐ€ ๊ธฐ๋ณธ๊ฐ’์ด ์žˆ์–ด๋„ ID๊ฐ€ `bar`์ธ ํ•ญ๋ชฉ(items)์ฒ˜๋Ÿผ ๋ฐ์ดํ„ฐ๊ฐ€ ๊ฐ’์„ ๊ฐ–๋Š”๋‹ค๋ฉด:
    
    ```Python hl_lines="3  5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    ์‘๋‹ต์— ํ•ด๋‹น ๊ฐ’๋“ค์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.
    
    #### ๊ธฐ๋ณธ๊ฐ’๊ณผ ๋™์ผํ•œ ๊ฐ’์„ ๊ฐ–๋Š” ๋ฐ์ดํ„ฐ
    
    If the data has the same values as the default ones, like the item with ID `baz`:
    ID๊ฐ€ `baz`์ธ ํ•ญ๋ชฉ(items)์ฒ˜๋Ÿผ ๊ธฐ๋ณธ๊ฐ’๊ณผ ๋™์ผํ•œ ๊ฐ’์„ ๊ฐ–๋Š”๋‹ค๋ฉด:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top