- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for unicos (0.15 sec)
-
docs/en/docs/tutorial/query-params-str-validations.md
``` The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python 3.10), that means that it's of type `str` but could also be `None`, and indeed, the default value is `None`, so FastAPI will know it's not required. !!! note FastAPI will know that the value of `q` is not required because of the default value `= None`.
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/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) -
docs/em/docs/tutorial/query-params-str-validations.md
{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` 🔢 🔢 `q` 🆎 `Union[str, None]` (⚖️ `str | None` 🐍 3️⃣.1️⃣0️⃣), 👈 ⛓ 👈 ⚫️ 🆎 `str` ✋️ 💪 `None`, & 👐, 🔢 💲 `None`, FastAPI 🔜 💭 ⚫️ 🚫 ✔. !!! note FastAPI 🔜 💭 👈 💲 `q` 🚫 ✔ ↩️ 🔢 💲 `= None`. `Union` `Union[str, 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/ja/docs/tutorial/query-params-str-validations.md
## 必須にする これ以上、バリデーションやメタデータを宣言する必要のない場合は、デフォルト値を指定しないだけでクエリパラメータ`q`を必須にすることができます。以下のように: ```Python q: str ``` 以下の代わりに: ```Python q: Union[str, None] = None ``` 現在は以下の例のように`Query`で宣言しています: ```Python q: Union[str, None] = Query(default=None, min_length=3) ``` そのため、`Query`を使用して必須の値を宣言する必要がある場合は、第一引数に`...`を使用することができます: ```Python hl_lines="7"
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/pt/docs/tutorial/query-params-str-validations.md
``` O parâmetro de consulta `q` é do tipo `Union[str, None]`, o que significa que é do tipo `str` mas que também pode ser `None`, e de fato, o valor padrão é `None`, então o FastAPI saberá que não é obrigatório. !!! note "Observação" O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= 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/ru/docs/tutorial/query-params-str-validations.md
```Python q: str ``` вместо: ```Python q: Union[str, None] = None ``` Но у нас query-параметр определён как `Query`. Например: === "Annotated" ```Python q: Annotated[Union[str, None], Query(min_length=3)] = None ``` === "без Annotated" ```Python q: Union[str, None] = Query(default=None, min_length=3) ```
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/de/docs/tutorial/query-params-str-validations.md
```Python q: str ``` statt: ```Python q: Union[str, None] = None ``` Aber jetzt deklarieren wir den Parameter mit `Query`, wie in: === "Annotiert" ```Python q: Annotated[Union[str, None], Query(min_length=3)] = None ``` === "Nicht annotiert" ```Python q: Union[str, None] = Query(default=None, min_length=3) ```
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/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) ``` 将会校验数据,在数据无效时展示清晰的错误信息,并在 OpenAPI 模式的*路径操作*中记录该参数。
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)