- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for str (0.11 sec)
-
docs/ja/docs/tutorial/query-params.md
特定の値を与えずにただオプショナルにしたい場合はデフォルト値を `None` にして下さい。 しかしクエリパラメータを必須にしたい場合は、ただデフォルト値を宣言しなければよいです: ```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` ここで、クエリパラメータ `needy` は `str` 型の必須のクエリパラメータです 以下のURLをブラウザで開くと: ``` http://127.0.0.1:8000/items/foo-item ``` ...必須のパラメータ `needy` を加えなかったので、以下の様なエラーが表示されます: ```JSON { "detail": [ {
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.6K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params.md
!!! note **FastAPI** saura que `q` est optionnel grâce au `=None`. Le `Optional` dans `Optional[str]` n'est pas utilisé par **FastAPI** (**FastAPI** n'en utilisera que la partie `str`), mais il servira tout de même à votre éditeur de texte pour détecter des erreurs dans votre code. ## Conversion des types des paramètres de requête
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Sep 27 20:52:31 GMT 2023 - 5.8K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params.md
```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` Here the query parameter `needy` is a required query parameter of type `str`. If you open in your browser a URL like: ``` http://127.0.0.1:8000/items/foo-item ``` ...without adding the required parameter `needy`, you will see an error like: ```JSON {
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Oct 20 09:08:42 GMT 2023 - 5.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params.md
!!! check "확인" **FastAPI**는 `item_id`가 경로 매개변수이고 `q`는 경로 매개변수가 아닌 쿼리 매개변수라는 것을 알 정도로 충분히 똑똑합니다. !!! note "참고" FastAPI는 `q`가 `= None`이므로 선택적이라는 것을 인지합니다. `Union[str, None]`에 있는 `Union`은 FastAPI(FastAPI는 `str` 부분만 사용합니다)가 사용하는게 아니지만, `Union[str, None]`은 편집기에게 코드에서 오류를 찾아낼 수 있게 도와줍니다. ## 쿼리 매개변수 형변환 `bool` 형으로 선언할 수도 있고, 아래처럼 변환됩니다: ```Python hl_lines="9" {!../../../docs_src/query_params/tutorial003.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params.md
本例中,查询参数 `q` 是可选的,默认值为 `None`。 !!! check "检查" 注意,**FastAPI** 可以识别出 `item_id` 是路径参数,`q` 不是路径参数,而是查询参数。 !!! note "笔记" 因为默认值为 `= None`,FastAPI 把 `q` 识别为可选参数。 FastAPI 不使用 `Optional[str]` 中的 `Optional`(只使用 `str`),但 `Optional[str]` 可以帮助编辑器发现代码中的错误。 ## 查询参数类型转换 参数还可以声明为 `bool` 类型,FastAPI 会自动转换参数类型: ```Python hl_lines="9" {!../../../docs_src/query_params/tutorial003.py!} ``` 本例中,访问: ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 4.6K bytes - Viewed (0) -
docs/es/docs/tutorial/query-params.md
!!! note "Nota" FastAPI sabrá que `q` es opcional por el `= None`. El `Union` en `Union[str, None]` no es usado por FastAPI (FastAPI solo usará la parte `str`), pero el `Union[str, None]` le permitirá a tu editor ayudarte a encontrar errores en tu código. ## Conversión de tipos de parámetros de query También puedes declarar tipos `bool` y serán convertidos:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.1K bytes - Viewed (0) -
docs/tr/docs/tutorial/query-params.md
Fakat, bir sorgu parametresini zorunlu yapmak istiyorsanız varsayılan bir değer atamamanız yeterli olacaktır: ```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` Burada `needy` parametresi `str` tipinden oluşan zorunlu bir sorgu parametresidir. Eğer tarayıcınızda şu bağlantıyı: ``` http://127.0.0.1:8000/items/foo-item ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.9K bytes - Viewed (0) -
docs/de/docs/tutorial/query-params.md
```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` Hier ist `needy` ein erforderlicher Query-Parameter vom Typ `str`. Wenn Sie in Ihrem Browser eine URL wie: ``` http://127.0.0.1:8000/items/foo-item ``` ... öffnen, ohne den benötigten Parameter `needy`, dann erhalten Sie einen Fehler wie den folgenden:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 25 14:53:41 GMT 2024 - 5.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params.md
```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` Aqui o parâmetro de consulta `needy` é um valor obrigatório, do tipo `str`. Se você abrir no seu navegador a URL: ``` http://127.0.0.1:8000/items/foo-item ``` ... sem adicionar o parâmetro obrigatório `needy`, você verá um erro como: ```JSON {
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params.md
```Python hl_lines="6-7" {!../../../docs_src/query_params/tutorial005.py!} ``` Здесь параметр запроса `needy` является обязательным параметром с типом данных `str`. Если вы откроете в браузере URL-адрес, например: ``` http://127.0.0.1:8000/items/foo-item ``` ...без добавления обязательного параметра `needy`, вы увидите подобного рода ошибку: ```JSON
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.4K bytes - Viewed (0)