Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 148 for NONE (0.13 sec)

  1. docs/fr/docs/tutorial/query-params-str-validations.md

    ```
    
    Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis.
    
    !!! note
        **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/query-params-str-validations.md

        ```
    
    👥 ✔️ ❎ 🔢 💲 `None` 🔢 ⏮️ `Query()`, 👥 💪 🔜 ⚒ 🔢 💲 ⏮️ 🔢 `Query(default=None)`, ⚫️ 🍦 🎏 🎯 ⚖ 👈 🔢 💲.
    
    :
    
    ```Python
    q: Union[str, None] = Query(default=None)
    ```
    
    ...⚒ 🔢 📦, 🎏:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    & 🐍 3️⃣.1️⃣0️⃣ & 🔛:
    
    ```Python
    q: str | None = Query(default=None)
    ```
    
    ...⚒ 🔢 📦, 🎏:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/query-params-str-validations.md

    ```
    
    デフォルト値`None`を`Query(default=None)`に置き換える必要があるので、`Query`の最初の引数はデフォルト値を定義するのと同じです。
    
    なので:
    
    ```Python
    q: Optional[str] = Query(default=None)
    ```
    
    ...を以下と同じようにパラメータをオプションにします:
    
    ```Python
    q: Optional[str] = None
    ```
    
    しかし、これはクエリパラメータとして明示的に宣言しています。
    
    !!! info "情報"
        FastAPIは以下の部分を気にすることを覚えておいてください:
    
        ```Python
        = None
        ```
    
        もしくは:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 10.5K bytes
    - Viewed (1)
  4. docs/en/docs/img/deployment/https/https01.drawio

                        <mxGeometry width="500" height="350" as="geometry"/>
                    </mxCell>
                    <mxCell id="90" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;startArrow=none;startFill=0;endArrow=classic;endFill=1;strokeWidth=3;" parent="1" source="101" target="32" edge="1">
    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)
  5. docs/zh/docs/tutorial/response-model.md

    ## 响应模型编码参数
    
    你的响应模型可以具有默认值,例如:
    
    ```Python hl_lines="11  13-14"
    {!../../../docs_src/response_model/tutorial004.py!}
    ```
    
    * `description: Union[str, None] = None` 具有默认值 `None`。
    * `tax: float = 10.5` 具有默认值 `10.5`.
    * `tags: List[str] = []` 具有一个空列表作为默认值: `[]`.
    
    但如果它们并没有存储实际的值,你可能想从结果中忽略它们的默认值。
    
    举个例子,当你在 NoSQL 数据库中保存了具有许多可选属性的模型,但你又不想发送充满默认值的很长的 JSON 响应。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/response-model.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="11  13-14"
        {!> ../../../docs_src/response_model/tutorial004.py!}
        ```
    
    * `description: Union[str, None] = None` (or `str | None = None` in Python 3.10) has a default of `None`.
    * `tax: float = 10.5` has a default of `10.5`.
    * `tags: List[str] = []` has a default of an empty list: `[]`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  7. docs/pl/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  8. docs/ru/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    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)
  9. docs/zh/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    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)
  10. docs/ja/docs/tutorial/response-model.md

    ## レスポンスモデルのエンコーディングパラメータ
    
    レスポンスモデルにはデフォルト値を設定することができます:
    
    ```Python hl_lines="11 13 14"
    {!../../../docs_src/response_model/tutorial004.py!}
    ```
    
    * `description: str = None`は`None`がデフォルト値です。
    * `tax: float = 10.5`は`10.5`がデフォルト値です。
    * `tags: List[str] = []` は空のリスト(`[]`)がデフォルト値です。
    
    しかし、実際に保存されていない場合には結果からそれらを省略した方が良いかもしれません。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top