- Sort Score
- Result 10 results
- Languages All
Results 251 - 260 of 874 for tutorial001 (0.1 sec)
-
docs/ru/docs/tutorial/response-status-code.md
```Python hl_lines="6" {!../../docs_src/response_status_code/tutorial001.py!} ``` `201` – это код статуса "Создано". Но вам не обязательно запоминать, что означает каждый из этих кодов. Для удобства вы можете использовать переменные из `fastapi.status`. ```Python hl_lines="1 6" {!../../docs_src/response_status_code/tutorial002.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
docs/ja/docs/tutorial/body.md
## Pydanticの `BaseModel` をインポート ます初めに、 `pydantic` から `BaseModel` をインポートする必要があります: ```Python hl_lines="2" {!../../docs_src/body/tutorial001.py!} ``` ## データモデルの作成 そして、`BaseModel` を継承したクラスとしてデータモデルを宣言します。 すべての属性にpython標準の型を使用します: ```Python hl_lines="5-9" {!../../docs_src/body/tutorial001.py!} ``` クエリパラメータの宣言と同様に、モデル属性がデフォルト値をもつとき、必須な属性ではなくなります。それ以外は必須になります。オプショナルな属性にしたい場合は `None` を使用してください。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.9K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python {!> ../../docs_src/security/tutorial001.py!} ``` //// ## Run it /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/index.md
然后,依赖项函数返回包含这些值的 `dict`。 ### 导入 `Depends` ```Python hl_lines="3" {!../../docs_src/dependencies/tutorial001.py!} ``` ### 声明依赖项 与在*路径操作函数*参数中使用 `Body`、`Query` 的方式相同,声明依赖项需要使用 `Depends` 和一个新的参数: ```Python hl_lines="15 20" {!../../docs_src/dependencies/tutorial001.py!} ``` 虽然,在路径操作函数的参数中使用 `Depends` 的方式与 `Body`、`Query` 相同,但 `Depends` 的工作方式略有不同。 这里只能传给 Depends 一个参数。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7K bytes - Viewed (0) -
docs/de/docs/tutorial/request-files.md
``` //// //// tab | Python 3.8+ nicht annotiert /// tip | "Tipp" Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" {!> ../../docs_src/request_files/tutorial001.py!} ``` //// ## `File`-Parameter definieren Erstellen Sie Datei-Parameter, so wie Sie es auch mit `Body` und `Form` machen würden: //// tab | Python 3.9+ ```Python hl_lines="9"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.3K bytes - Viewed (0) -
docs/pt/docs/tutorial/request_files.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip | Dica Utilize a versão com `Annotated` se possível. /// ```Python hl_lines="1" {!> ../../docs_src/request_files/tutorial001.py!} ``` //// ## Defina os parâmetros de `File` Cria os parâmetros do arquivo da mesma forma que você faria para `Body` ou `Form`: //// tab | Python 3.9+ ```Python hl_lines="9"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.8K bytes - Viewed (0) -
docs/zh/docs/python-types.md
## 动机 让我们从一个简单的例子开始: ```Python {!../../docs_src/python_types/tutorial001.py!} ``` 运行这段程序将输出: ``` John Doe ``` 这个函数做了下面这些事情: * 接收 `first_name` 和 `last_name` 参数。 * 通过 `title()` 将每个参数的第一个字母转换为大写形式。 * 中间用一个空格来<abbr title="将它们按顺序放置组合成一个整体。">拼接</abbr>它们。 ```Python hl_lines="2" {!../../docs_src/python_types/tutorial001.py!} ``` ### 修改示例 这是一个非常简单的程序。 现在假设你将从头开始编写这段程序。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/pt/docs/python-types.md
```Python hl_lines="1" {!../../docs_src/python_types/tutorial003.py!} ``` Como o editor conhece os tipos de variáveis, você não obtém apenas o preenchimento automático, mas também as verificações de erro: <img src="/img/python-types/image04.png"> Agora você sabe que precisa corrigí-lo, converta `age` em uma string com `str(age)`: ```Python hl_lines="2" {!../../docs_src/python_types/tutorial004.py!} ``` ## Declarando Tipos
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 12:32:27 UTC 2024 - 18K bytes - Viewed (0) -
docs/pt/docs/advanced/response-cookies.md
Então, defina os cookies nela e a retorne: ```Python hl_lines="10-12" {!../../docs_src/response_cookies/tutorial001.py!} ``` /// tip | Dica Lembre-se de que se você retornar uma resposta diretamente em vez de usar o parâmetro `Response`, FastAPI a retornará diretamente.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 14 09:15:24 UTC 2024 - 2.4K bytes - Viewed (0) -
docs/pt/docs/advanced/response-headers.md
```Python hl_lines="10-12" {!../../docs_src/response_headers/tutorial001.py!} ``` /// note | "Detalhes técnicos" Você também pode usar `from starlette.responses import Response` ou `from starlette.responses import JSONResponse`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 16 07:44:45 UTC 2024 - 2.5K bytes - Viewed (0)