Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 51 for body (0.15 sec)

  1. docs/en/docs/how-to/sql-databases-peewee.md

    ```Python
    # db._state = PeeweeConnectionState()
    ```
    
    And in the file `sql_app/main.py` file, comment the body of the `async` dependency `reset_db_state()` and replace it with a `pass`:
    
    ```Python
    async def reset_db_state():
    #     database.db._state._state.set(db_state_default.copy())
    #     database.db._state.reset()
        pass
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (1)
  2. docs/fa/docs/features.md

    * مستندسازی خودکار data model با <a href="https://json-schema.org/" class="external-link" target="_blank"><strong>JSON Schema</strong></a> (همانطور که OpenAPI خود نیز مبتنی بر JSON Schema است).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 15K bytes
    - Viewed (0)
  3. docs/zh-hant/docs/index.md

        - 如果驗證失敗,將會返回清楚有用的錯誤訊息。
    - 查看 `GET` 請求中是否有命名為 `q` 的查詢參數 (例如 `http://127.0.0.1:8000/items/foo?q=somequery`)。
        - 因為 `q` 參數被宣告為 `= None`,所以是選填的。
        - 如果沒有宣告 `None`,則此參數將會是必填 (例如 `PUT` 範例的請求 body)。
    - 對於 `PUT` 的請求 `/items/{item_id}`,將會讀取 body 為 JSON:
        - 驗證是否有必填屬性 `name` 且型別是 `str`。
        - 驗證是否有必填屬性 `price` 且型別是 `float`。
        - 驗證是否有選填屬性 `is_offer` 且型別是 `bool`。
        - 以上驗證都適用於多層次巢狀 JSON 物件。
    - 自動轉換 JSON 格式。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/custom-response.md

    ```Python hl_lines="2  7  9"
    {!../../../docs_src/custom_response/tutorial006c.py!}
    ```
    
    ### `StreamingResponse`
    
    Takes an async generator or a normal generator/iterator and streams the response body.
    
    ```Python hl_lines="2  14"
    {!../../../docs_src/custom_response/tutorial007.py!}
    ```
    
    #### Using `StreamingResponse` with file-like objects
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/handling-errors.md

    ```JSON hl_lines="12-15"
    {
      "detail": [
        {
          "loc": [
            "body",
            "size"
          ],
          "msg": "value is not a valid integer",
          "type": "type_error.integer"
        }
      ],
      "body": {
        "title": "towel",
        "size": "XL"
      }
    }
    ```
    
    #### `HTTPException` в FastAPI или в Starlette
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/simple-oauth2.md

            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="4  76"
        {!> ../../../docs_src/security/tutorial003.py!}
        ```
    
    `OAuth2PasswordRequestForm` is a class dependency that declares a form body with:
    
    * The `username`.
    * The `password`.
    * An optional `scope` field as a big string, composed of strings separated by spaces.
    * An optional `grant_type`.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  7. docs/tr/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Örneği Güncelleyelim
    
    Şimdi `main.py` dosyasını, `PUT` isteğiyle birlikte bir gövde alacak şekilde değiştirelim.
    
    <abbr title="Gövde: Body">Gövde</abbr>yi Pydantic sayesinde standart python tiplerini kullanarak tanımlayalım.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/query-params-str-validations.md

        "foo",
        "bar"
      ]
    }
    ```
    
    !!! tip
        To declare a query parameter with a type of `list`, like in the example above, you need to explicitly use `Query`, otherwise it would be interpreted as a request body.
    
    The interactive API docs will update accordingly, to allow multiple values:
    
    <img src="/img/tutorial/query-params-str-validations/image02.png">
    
    ### Query parameter list / multiple values with defaults
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  9. docs/ko/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## 예제 심화
    
    이제 `PUT` 요청에 있는 본문(Body)을 받기 위해 `main.py`를 수정해봅시다.
    
    Pydantic을 이용해 파이썬 표준 타입으로 본문을 선언합니다.
    
    ```Python hl_lines="4  9 10 11 12  25 26 27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  10. docs/fa/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## تغییر مثال
    
    حال فایل `main.py` را مطابق زیر ویرایش کنید تا بتوانید <abbr title="Body">بدنه</abbr> یک درخواست `PUT` را دریافت کنید.
    
    به کمک Pydantic بدنه درخواست را با <abbr title="Type">انواع</abbr> استاندارد پایتون تعریف کنید.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Optional
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 25.9K bytes
    - Viewed (0)
Back to top