- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for defaults (0.15 sec)
-
docs/en/docs/tutorial/query-params-str-validations.md
As in this case (without using `Annotated`) we have to replace the default value `None` in the function with `Query()`, we now need to set the default value with the parameter `Query(default=None)`, it serves the same purpose of defining that default value (at least for FastAPI). So: ```Python q: Union[str, None] = Query(default=None) ``` ...makes the parameter optional, with a default value of `None`, the same as: ```Python
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) -
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 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) -
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) -
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) -
docs/de/docs/tutorial/query-params-str-validations.md
<img src="/img/tutorial/query-params-str-validations/image02.png"> ### Query-Parameter-Liste / Mehrere Werte mit Defaults Und Sie können auch eine Default-`list`e von Werten definieren, wenn keine übergeben werden: === "Python 3.9+" ```Python hl_lines="9" {!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 17:58:59 GMT 2024 - 27.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params-str-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 38K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params-str-validations.md
{!../../../docs_src/query_params_str_validations/tutorial002.py!} ``` Note que substituímos o valor padrão de `None` para `Query(default=None)`, o primeiro parâmetro de `Query` serve para o mesmo propósito: definir o valor padrão do parâmetro. Então: ```Python q: Union[str, None] = Query(default=None) ``` ...Torna o parâmetro opcional, da mesma maneira que: ```Python q: Union[str, None] = None ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 9.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
``` 由于我们必须用 `Query(default=None)` 替换默认值 `None`,`Query` 的第一个参数同样也是用于定义默认值。 所以: ```Python q: Union[str, None] = Query(default=None) ``` ...使得参数可选,等同于: ```Python q: str = None ``` 但是 `Query` 显式地将其声明为查询参数。 然后,我们可以将更多的参数传递给 `Query`。在本例中,适用于字符串的 `max_length` 参数: ```Python q: Union[str, None] = Query(default=None, max_length=50) ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.2K bytes - Viewed (0)