- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for tutorial002 (0.1 sec)
-
docs/fr/docs/tutorial/query-params-str-validations.md
Pour cela, importez d'abord `Query` depuis `fastapi` : {* ../../docs_src/query_params_str_validations/tutorial002.py hl[3] *} ## Utiliser `Query` comme valeur par défaut Construisez ensuite la valeur par défaut de votre paramètre avec `Query`, en choisissant 50 comme `max_length` : {* ../../docs_src/query_params_str_validations/tutorial002.py hl[9] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:14:38 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/en/docs/how-to/custom-docs-ui-assets.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:42:34 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/ko/docs/advanced/response-cookies.md
# 응답 쿠키 ## `Response` 매개변수 사용하기 *경로 작동 함수*에서 `Response` 타입의 매개변수를 선언할 수 있습니다. 그런 다음 해당 *임시* 응답 객체에서 쿠키를 설정할 수 있습니다. ```Python hl_lines="1 8-9" {!../../docs_src/response_cookies/tutorial002.py!} ``` 그런 다음 필요한 객체(`dict`, 데이터베이스 모델 등)를 반환할 수 있습니다. 그리고 `response_model`을 선언했다면 반환한 객체를 거르고 변환하는 데 여전히 사용됩니다. **FastAPI**는 그 *임시* 응답에서 쿠키(또한 헤더 및 상태 코드)를 추출하고, 반환된 값이 포함된 최종 응답에 이를 넣습니다. 이 값은 `response_model`로 걸러지게 됩니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 10:32:45 UTC 2024 - 2.4K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
All we need to do is handle the request inside a `try`/`except` block: {* ../../docs_src/custom_request_and_route/tutorial002.py hl[13,15] *} If an exception occurs, the`Request` instance will still be in scope, so we can read and make use of the request body when handling the error: {* ../../docs_src/custom_request_and_route/tutorial002.py hl[16:18] *} ## Custom `APIRoute` class in a router
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 22:39:38 UTC 2024 - 4.3K bytes - Viewed (0) -
docs/en/docs/how-to/configure-swagger-ui.md
{* ../../docs_src/configure_swagger_ui/tutorial001.py hl[3] *} ...and then Swagger UI won't show the syntax highlighting anymore: <img src="/img/tutorial/extending-openapi/image03.png"> ## Change the Theme The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle): {* ../../docs_src/configure_swagger_ui/tutorial002.py hl[3] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:50:52 UTC 2024 - 2.7K bytes - Viewed (0) -
docs/pt/docs/advanced/custom-response.md
```Python hl_lines="1 18" {!../../docs_src/response_directly/tutorial002.py!} ``` ### `HTMLResponse` Usa algum texto ou sequência de bytes e retorna uma resposta HTML. Como você leu acima. ### `PlainTextResponse` Usa algum texto ou sequência de bytes para retornar uma resposta de texto não formatado. ```Python hl_lines="2 7 9" {!../../docs_src/custom_response/tutorial005.py!} ``` ### `JSONResponse`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 11:47:10 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params.md
## Paramètres optionnels De la même façon, vous pouvez définir des paramètres de requête comme optionnels, en leur donnant comme valeur par défaut `None` : {* ../../docs_src/query_params/tutorial002.py hl[9] *} Ici, le paramètre `q` sera optionnel, et aura `None` comme valeur par défaut. /// check | "Remarque"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:06:01 UTC 2024 - 5.6K bytes - Viewed (0) -
docs/en/docs/tutorial/response-status-code.md
Let's see the previous example again: {* ../../docs_src/response_status_code/tutorial001.py hl[6] *} `201` is the status code for "Created". But you don't have to memorize what each of these codes mean. You can use the convenience variables from `fastapi.status`. {* ../../docs_src/response_status_code/tutorial002.py hl[1,6] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:13:18 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/fr/docs/tutorial/background-tasks.md
{* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *} ## Ajouter une tâche d'arrière-plan Dans votre *fonction de chemin*, passez votre fonction de tâche à l'objet de type `BackgroundTasks` (`background_tasks` ici) grâce à la méthode `.add_task()` : {* ../../docs_src/background_tasks/tutorial001.py hl[14] *} `.add_task()` reçoit comme arguments :
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:29:51 UTC 2024 - 5.6K bytes - Viewed (0) -
docs/en/docs/advanced/middleware.md
{* ../../docs_src/advanced_middleware/tutorial001.py hl[2,6] *} ## `TrustedHostMiddleware` Enforces that all incoming requests have a correctly set `Host` header, in order to guard against HTTP Host Header attacks. {* ../../docs_src/advanced_middleware/tutorial002.py hl[2,6:8] *} The following arguments are supported:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:45:50 UTC 2024 - 4K bytes - Viewed (0)