- Sort Score
- Result 10 results
- Languages All
Results 1651 - 1660 of 1,989 for py$ (0.04 sec)
-
docs/en/docs/tutorial/first-steps.md
The simplest FastAPI file could look like this: {* ../../docs_src/first_steps/tutorial001.py *} Copy that to a file `main.py`. Run the live server: <div class="termy"> ```console $ <font color="#4E9A06">fastapi</font> dev <u style="text-decoration-style:single">main.py</u> <font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:48:16 UTC 2024 - 11.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/background-tasks.md
```Python hl_lines="6-9" {!../../docs_src/background_tasks/tutorial001.py!} ``` ## Adicionar a tarefa em segundo plano Dentro de sua _função de operação de caminho_, passe sua função de tarefa para o objeto _tarefas em segundo plano_ com o método `.add_task()`: ```Python hl_lines="14" {!../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` recebe como argumentos:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.3K bytes - Viewed (0) -
docs/en/docs/tutorial/background-tasks.md
{* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *} ## Add the background task Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`: {* ../../docs_src/background_tasks/tutorial001.py hl[14] *} `.add_task()` receives as arguments:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:22:48 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/pt/docs/advanced/additional-responses.md
Por exemplo, para declarar um outro retorno com o status code `404` e um modelo do Pydantic chamado `Message`, você pode escrever: ```Python hl_lines="18 22" {!../../docs_src/additional_responses/tutorial001.py!} ``` /// note | "Nota" Lembre-se que você deve retornar o `JSONResponse` diretamente. /// /// info | "Informação" A chave `model` não é parte do OpenAPI.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.3K 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/pt/docs/advanced/dataclasses.md
```Python hl_lines="1 7-12 19-20" {!../../docs_src/dataclasses/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 17:33:53 UTC 2024 - 4.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/schema-extra-example.md
```Python hl_lines="15 16 17 18 19 20 21 22 23" {!../../docs_src/schema_extra_example/tutorial001.py!} ``` その追加情報はそのまま出力され、JSON Schemaに追加されます。 ## `Field`の追加引数 後述する`Field`、`Path`、`Query`、`Body`などでは、任意の引数を関数に渡すことでJSON Schemaの追加情報を宣言することもできます: ```Python hl_lines="4 10 11 12 13" {!../../docs_src/schema_extra_example/tutorial002.py!} ``` /// warning | "注意" これらの追加引数が渡されても、文書化のためのバリデーションは追加されず、注釈だけが追加されることを覚えておいてください。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
```Python hl_lines="14" {!../../docs_src/handling_errors/tutorial002.py!} ``` ## 安装自定义异常处理器 添加自定义处理器,要使用 [Starlette 的异常工具](https://www.starlette.io/exceptions/)。 假设要触发的自定义异常叫作 `UnicornException`。 且需要 FastAPI 实现全局处理该异常。 此时,可以用 `@app.exception_handler()` 添加自定义异常控制器: ```Python hl_lines="5-7 13-18 24" {!../../docs_src/handling_errors/tutorial003.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.4K bytes - Viewed (0) -
docs/em/docs/advanced/response-headers.md
# 📨 🎚 ## ⚙️ `Response` 🔢 👆 💪 📣 🔢 🆎 `Response` 👆 *➡ 🛠️ 🔢* (👆 💪 🍪). & ⤴️ 👆 💪 ⚒ 🎚 👈 *🔀* 📨 🎚. ```Python hl_lines="1 7-8" {!../../docs_src/response_headers/tutorial002.py!} ``` & ⤴️ 👆 💪 📨 🙆 🎚 👆 💪, 👆 🛎 🔜 ( `dict`, 💽 🏷, ♒️). & 🚥 👆 📣 `response_model`, ⚫️ 🔜 ⚙️ ⛽ & 🗜 🎚 👆 📨.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
docs/en/docs/img/tutorial/bigger-applications/package.drawio
</mxCell> <mxCell id="3" value="<font style="font-size: 24px" face="Roboto">Package app<br>app/__init__.py</font>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;strokeWidth=3;fontFamily=Roboto Mono, mono;FType=g;" parent="1" vertex="1">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 12 00:06:16 UTC 2022 - 6.1K bytes - Viewed (0)