- Sort Score
- Result 10 results
- Languages All
Results 361 - 370 of 871 for tutorial001 (0.14 sec)
-
docs/pt/docs/advanced/response-directly.md
Para esses casos, você pode usar o `jsonable_encoder` para converter seus dados antes de repassá-los para a resposta: ```Python hl_lines="6-7 21-22" {!../../docs_src/response_directly/tutorial001.py!} ``` /// note | Detalhes Técnicos Você também pode utilizar `from starlette.responses import JSONResponse`.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/extra-models.md
{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="9 11 16 22 24 29-30 33-35 40-41" {!> ../../docs_src/extra_models/tutorial001.py!} ``` //// ### `**user_in.dict()` 简介 #### Pydantic 的 `.dict()` `user_in` 是类 `UserIn` 的 Pydantic 模型。 Pydantic 模型支持 `.dict()` 方法,能返回包含模型数据的**字典**。 因此,如果使用如下方式创建 Pydantic 对象 `user_in`:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.6K bytes - Viewed (0) -
docs/de/docs/how-to/configure-swagger-ui.md
<img src="/img/tutorial/extending-openapi/image02.png"> Sie können sie jedoch deaktivieren, indem Sie `syntaxHighlight` auf `False` setzen: ```Python hl_lines="3" {!../../docs_src/configure_swagger_ui/tutorial001.py!} ``` ... und dann zeigt die Swagger-Oberfläche die Syntaxhervorhebung nicht mehr an: <img src="/img/tutorial/extending-openapi/image03.png"> ## Das Theme ändern
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params.md
```Python hl_lines="17" {!../../docs_src/path_params/tutorial005.py!} ``` #### *Enum-Wert* erhalten Den tatsächlichen Wert (in diesem Fall ein `str`) erhalten Sie via `model_name.value`, oder generell, `ihr_enum_member.value`: ```Python hl_lines="20" {!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "Tipp"
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/em/docs/advanced/additional-status-codes.md
🏆 👈, 🗄 `JSONResponse`, & 📨 👆 🎚 📤 🔗, ⚒ `status_code` 👈 👆 💚: ```Python hl_lines="4 25" {!../../docs_src/additional_status_codes/tutorial001.py!} ``` /// warning 🕐❔ 👆 📨 `Response` 🔗, 💖 🖼 🔛, ⚫️ 🔜 📨 🔗. ⚫️ 🏆 🚫 🎻 ⏮️ 🏷, ♒️. ⚒ 💭 ⚫️ ✔️ 📊 👆 💚 ⚫️ ✔️, & 👈 💲 ☑ 🎻 (🚥 👆 ⚙️ `JSONResponse`). /// /// note | "📡 ℹ"
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/encoder.md
//// tab | Python 3.10+ ```Python hl_lines="4 21" {!> ../../docs_src/encoder/tutorial001_py310.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="5 22" {!> ../../docs_src/encoder/tutorial001.py!} ``` //// Neste exemplo, ele converteria o modelo Pydantic em um `dict`, e o `datetime` em um `str`.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.extra_data_types.tutorial001 import app client = TestClient(app) def test_extra_types(): item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e" data = { "start_datetime": "2018-12-22T14:00:00+00:00", "end_datetime": "2018-12-24T15:00:00+00:00", "repeat_at": "15:30:00", "process_after": 300, }
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 6.8K bytes - Viewed (0) -
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.extending_openapi.tutorial001 import app client = TestClient(app) def test(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.5K bytes - Viewed (0) -
scripts/playwright/cookie_param_models/image01.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/response-model.md
/// ## 返回与输入相同的数据 现在我们声明一个 `UserIn` 模型,它将包含一个明文密码属性。 ```Python hl_lines="9 11" {!../../docs_src/response_model/tutorial002.py!} ``` 我们正在使用此模型声明输入数据,并使用同一模型声明输出数据: ```Python hl_lines="17-18" {!../../docs_src/response_model/tutorial002.py!} ``` 现在,每当浏览器使用一个密码创建用户时,API 都会在响应中返回相同的密码。 在这个案例中,这可能不算是问题,因为用户自己正在发送密码。 但是,如果我们在其他的*路径操作*中使用相同的模型,则可能会将用户的密码发送给每个客户端。 /// danger
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0)