- Sort Score
- Num 10 results
- Language All
Results 651 - 660 of 713 for Pydantic (0.08 seconds)
-
tests/test_request_params/test_header/test_list.py
from typing import Annotated import pytest from dirty_equals import AnyThing, IsOneOf, IsPartialDict from fastapi import FastAPI, Header from fastapi.testclient import TestClient from pydantic import BaseModel, Field app = FastAPI() # ===================================================================================== # Without aliases @app.get("/required-list-str") async def read_required_list_str(p: Annotated[list[str], Header()]):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:31:34 GMT 2025 - 11K bytes - Click Count (0) -
docs/ru/docs/tutorial/security/oauth2-jwt.md
Создайте переменную `ALGORITHM` с алгоритмом, используемым для подписи JWT-токена, и установите для нее значение `"HS256"`. Создайте переменную для срока действия токена. Определите Pydantic-модель, которая будет использоваться для формирования ответа на запрос на получение токена. Создайте служебную функцию для генерации нового токена доступа.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 19.1K bytes - Click Count (0) -
tests/test_openapi_separate_input_output_schemas.py
from typing import Optional from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, computed_field class SubItem(BaseModel): subname: str sub_description: Optional[str] = None tags: list[str] = [] model_config = {"json_schema_serialization_defaults_required": True} class Item(BaseModel): name: str
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 26.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
如果不存在指定用户,则返回错误消息,提示**用户名或密码错误**。 本例使用 `HTTPException` 异常显示此错误: {* ../../docs_src/security/tutorial003.py hl[3,77:79] *} ### 校验密码 至此,我们已经从数据库中获取了用户数据,但尚未校验密码。 接下来,首先将数据放入 Pydantic 的 `UserInDB` 模型。 注意:永远不要保存明文密码,本例暂时先使用(伪)哈希密码系统。 如果密码不匹配,则返回与上面相同的错误。 #### 密码哈希 **哈希**是指,将指定内容(本例中为密码)转换为形似乱码的字节序列(其实就是字符串)。 每次传入完全相同的内容(比如,完全相同的密码)时,得到的都是完全相同的乱码。Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 8.6K bytes - Click Count (0) -
docs/fr/docs/tutorial/first-steps.md
Vous pouvez retourner un dictionnaire (`dict`), une liste (`list`), des valeurs seules comme des chaines de caractères (`str`) et des entiers (`int`), etc. Vous pouvez aussi retourner des models **Pydantic** (qui seront détaillés plus tard). Il y a de nombreux autres objets et modèles qui seront automatiquement convertis en JSON. Essayez d'utiliser vos favoris, il est fort probable qu'ils soient déjà supportés.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 10.1K bytes - Click Count (0) -
docs/ru/docs/deployment/docker.md
Например, ваш `requirements.txt` может выглядеть так: ``` fastapi[standard]>=0.113.0,<0.114.0 pydantic>=2.7.0,<3.0.0 ``` И обычно вы установите эти зависимости командой `pip`, например: <div class="termy"> ```console $ pip install -r requirements.txt ---> 100% Successfully installed fastapi pydantic ``` </div> /// info | Информация
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:24:39 GMT 2025 - 44.7K bytes - Click Count (0) -
docs/en/docs/tutorial/request-files.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 7.3K bytes - Click Count (0) -
docs/pt/docs/tutorial/request-files.md
/// /// note | Detalhes Técnicos do Starlette O `UploadFile` do **FastAPI** herda diretamente do `UploadFile` do **Starlette**, mas adiciona algumas partes necessárias para torná-lo compatível com o **Pydantic** e as outras partes do FastAPI. /// ## O que é "Form Data" { #what-is-form-data }
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 8.1K bytes - Click Count (0) -
scripts/notify_translations.py
import logging import random import sys import time from pathlib import Path from typing import Any, Union, cast import httpx from github import Github from pydantic import BaseModel, SecretStr from pydantic_settings import BaseSettings awaiting_label = "awaiting-review" lang_all_label = "lang-all" approved_label = "approved-1" github_graphql_url = "https://api.github.com/graphql"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 12.7K bytes - Click Count (0) -
docs/pt/docs/tutorial/security/oauth2-jwt.md
Crie uma variável `ALGORITHM` com o algoritmo usado para assinar o token JWT e defina como `"HS256"`. Crie uma variável para a expiração do token. Defina um modelo Pydantic que será usado no endpoint de token para a resposta. Crie uma função utilitária para gerar um novo token de acesso. {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,79:87] *}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 11.4K bytes - Click Count (0)