- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 849 for Pydantic (0.05 sec)
-
docs/em/docs/tutorial/security/get-current-user.md
```Python hl_lines="10" {!../../docs_src/security/tutorial001.py!} ``` ✋️ 👈 🚫 👈 ⚠. ➡️ ⚒ ⚫️ 🤝 👥 ⏮️ 👩💻. ## ✍ 👩💻 🏷 🥇, ➡️ ✍ Pydantic 👩💻 🏷. 🎏 🌌 👥 ⚙️ Pydantic 📣 💪, 👥 💪 ⚙️ ⚫️ 🙆 🙆: //// tab | 🐍 3️⃣.6️⃣ & 🔛 ```Python hl_lines="5 12-16" {!> ../../docs_src/security/tutorial002.py!} ``` //// //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
from typing import Optional from dirty_equals import IsDict from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/schema-extra-example.md
`"json_schema_extra"`를 생성된 JSON 스키마에서 보여주고 싶은 별도의 데이터와 `examples`를 포함하는 `dict`으로 설정할 수 있습니다. //// //// tab | Pydantic v1
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/encoder.md
Da mesma forma, este banco de dados não receberia um modelo Pydantic (um objeto com atributos), apenas um `dict`. Você pode usar a função `jsonable_encoder` para resolver isso. A função recebe um objeto, como um modelo Pydantic e retorna uma versão compatível com JSON: //// tab | Python 3.10+ ```Python hl_lines="4 21"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0) -
docs/zh/docs/advanced/settings.md
## Pydantic 的 `Settings` 幸运的是,Pydantic 提供了一个很好的工具来处理来自环境变量的设置,即<a href="https://docs.pydantic.dev/latest/concepts/pydantic_settings/" class="external-link" target="_blank">Pydantic: Settings management</a>。 ### 创建 `Settings` 对象 从 Pydantic 导入 `BaseSettings` 并创建一个子类,与 Pydantic 模型非常相似。 与 Pydantic 模型一样,您使用类型注释声明类属性,还可以指定默认值。 您可以使用与 Pydantic 模型相同的验证功能和工具,比如不同的数据类型和使用 `Field()` 进行附加验证。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.8K bytes - Viewed (0) -
docs/de/docs/tutorial/schema-extra-example.md
## Zusätzliche JSON-Schemadaten in Pydantic-Modellen Sie können `examples` („Beispiele“) für ein Pydantic-Modell deklarieren, welche dem generierten JSON-Schema hinzugefügt werden. //// tab | Python 3.10+ Pydantic v2 ```Python hl_lines="13-24" {!> ../../docs_src/schema_extra_example/tutorial001_py310.py!} ``` //// //// tab | Python 3.10+ Pydantic v1 ```Python hl_lines="13-23"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/body.md
使用 <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> 模型声明**请求体**,能充分利用它的功能和优点。 /// info | "说明" 发送数据使用 `POST`(最常用)、`PUT`、`DELETE`、`PATCH` 等操作。 规范中没有定义使用 `GET` 发送请求体的操作,但不管怎样,FastAPI 也支持这种方式,只不过仅用于非常复杂或极端的用例。 我们不建议使用 `GET`,因此,在 Swagger UI 交互文档中不会显示有关 `GET` 的内容,而且代理协议也不一定支持 `GET`。 /// ## 导入 Pydantic 的 `BaseModel` 从 `pydantic` 中导入 `BaseModel`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.4K bytes - Viewed (0) -
docs/en/docs/tutorial/extra-data-types.md
* `Decimal`: * Standard Python `Decimal`. * In requests and responses, handled the same as a `float`. * You can check all the valid Pydantic data types here: <a href="https://docs.pydantic.dev/latest/usage/types/types/" class="external-link" target="_blank">Pydantic data types</a>. ## Example Here's an example *path operation* with parameters using some of the above types. //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4K bytes - Viewed (0) -
docs/em/docs/tutorial/extra-models.md
{!> ../../docs_src/extra_models/tutorial001_py310.py!} ``` //// ### 🔃 `**user_in.dict()` #### Pydantic `.dict()` `user_in` Pydantic 🏷 🎓 `UserIn`. Pydantic 🏷 ✔️ `.dict()` 👩🔬 👈 📨 `dict` ⏮️ 🏷 💽. , 🚥 👥 ✍ Pydantic 🎚 `user_in` 💖: ```Python user_in = UserIn(username="john", password="secret", email="******@****.***") ``` & ⤴️ 👥 🤙:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.8K bytes - Viewed (0) -
fastapi/routing.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 172.1K bytes - Viewed (0)