Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for defaults (0.44 sec)

  1. docs/en/docs/tutorial/response-model.md

    * `tax: float = 10.5` has a default of `10.5`.
    * `tags: List[str] = []` has a default of an empty list: `[]`.
    
    but you might want to omit them from the result if they were not actually stored.
    
    For example, if you have models with many optional attributes in a NoSQL database, but you don't want to send very long JSON responses full of default values.
    
    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)
  2. docs/en/docs/alternatives.md

    They are, more or less, at opposite ends, complementing each other.
    
    Requests has a very simple and intuitive design, it's very easy to use, with sensible defaults. But at the same time, it's very powerful and customizable.
    
    That's why, as said in the official website:
    
    > Requests is one of the most downloaded Python packages of all time
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-model.md

    !!! info
        Sie können auch:
    
        * `response_model_exclude_defaults=True`
        * `response_model_exclude_none=True`
    
        verwenden, wie in der <a href="https://docs.pydantic.dev/1.10/usage/exporting_models/#modeldict" class="external-link" target="_blank">Pydantic Dokumentation</a> für `exclude_defaults` und `exclude_none` beschrieben.
    
    #### Daten mit Werten für Felder mit Defaultwerten
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/response-model.md

    !!! info
        👆 💪 ⚙️:
    
        * `response_model_exclude_defaults=True`
        * `response_model_exclude_none=True`
    
        🔬 <a href="https://docs.pydantic.dev/latest/concepts/serialization/#modeldict" class="external-link" target="_blank">Pydantic 🩺</a> `exclude_defaults` &amp; `exclude_none`.
    
    #### 📊 ⏮️ 💲 🏑 ⏮️ 🔢
    
    ✋️ 🚥 👆 📊 ✔️ 💲 🏷 🏑 ⏮️ 🔢 💲, 💖 🏬 ⏮️ 🆔 `bar`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 16K bytes
    - Viewed (0)
  5. fastapi/params.py

            json_schema_extra: Union[Dict[str, Any], None] = None,
            **extra: Any,
        ):
            assert default is ..., "Path parameters cannot have a default value"
            self.in_ = self.in_
            super().__init__(
                default=default,
                default_factory=default_factory,
                annotation=annotation,
                alias=alias,
                alias_priority=alias_priority,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  6. tests/test_query.py

                    }
                ]
            }
        )
    
    
    def test_query_int_default():
        response = client.get("/query/int/default")
        assert response.status_code == 200
        assert response.json() == "foo bar 10"
    
    
    def test_query_int_default_query_50():
        response = client.get("/query/int/default?query=50")
        assert response.status_code == 200
        assert response.json() == "foo bar 50"
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  7. 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
    ```
    
    &amp; 🐍 3️⃣.1️⃣0️⃣ &amp; 🔛:
    
    ```Python
    q: str | None = Query(default=None)
    ```
    
    ...⚒ 🔢 📦, 🎏:
    
    ```Python
    q: str | None = None
    ```
    
    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)
  8. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

                            },
                            "tax": {"title": "Tax", "type": "number", "default": 10.5},
                            "tags": {
                                "title": "Tags",
                                "type": "array",
                                "items": {"type": "string"},
                                "default": [],
                            },
                        },
                    },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  9. docs/fr/docs/tutorial/query-params-str-validations.md

    Comme nous devons remplacer la valeur par défaut `None` dans la fonction par `Query()`, nous pouvons maintenant définir la valeur par défaut avec le paramètre `Query(default=None)`, il sert le même objectif qui est de définir cette valeur par défaut.
    
    Donc :
    
    ```Python
    q: Union[str, None] = Query(default=None)
    ```
    
    ... rend le paramètre optionnel, et est donc équivalent à :
    
    ```Python
    q: Union[str, None] = 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)
  10. docs/ja/docs/tutorial/query-params-str-validations.md

    パラメータのデフォルト値として使用し、パラメータ`max_length`を50に設定します:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    デフォルト値`None`を`Query(default=None)`に置き換える必要があるので、`Query`の最初の引数はデフォルト値を定義するのと同じです。
    
    なので:
    
    ```Python
    q: Optional[str] = Query(default=None)
    ```
    
    ...を以下と同じようにパラメータをオプションにします:
    
    ```Python
    q: Optional[str] = None
    ```
    
    しかし、これはクエリパラメータとして明示的に宣言しています。
    
    !!! info "情報"
    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)
Back to top