- Sort Score
- Num 10 results
- Language All
Results 811 - 820 of 1,083 for str (0.02 seconds)
-
docs/ru/docs/tutorial/path-params.md
### Создание класса `Enum` { #create-an-enum-class } Импортируйте `Enum` и создайте подкласс, который наследуется от `str` и `Enum`. Мы наследуемся от `str`, чтобы документация API могла понять, что значения должны быть типа `string` и отображалась правильно. Затем создайте атрибуты класса с фиксированными допустимыми значениями:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 14K bytes - Click Count (0) -
tests/test_response_model_include_exclude.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel class Model1(BaseModel): foo: str bar: str class Model2(BaseModel): ref: Model1 baz: str class Model3(BaseModel): name: str age: int ref2: Model2 app = FastAPI() @app.get( "/simple_include", response_model=Model2,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Jul 19 19:14:58 GMT 2021 - 4K bytes - Click Count (0) -
docs/es/docs/tutorial/security/get-current-user.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:41:41 GMT 2026 - 4.4K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/sql-databases.md
* `Field(index=True)` 告訴 SQLModel 應為此欄位建立「SQL 索引」,以便在用此欄位過濾讀取資料時更快查詢。 SQLModel 會知道宣告為 `str` 的欄位在 SQL 中會是 `TEXT`(或 `VARCHAR`,依資料庫而定)。 ### 建立引擎 { #create-an-engine } SQLModel 的 `engine`(底層實際上是 SQLAlchemy 的 `engine`)是用來「維護與資料庫連線」的東西。 你的程式中應該只有「單一 `engine` 物件」來連到同一個資料庫。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 14.8K bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial002.py
client = TestClient(mod.app) return client @pytest.mark.parametrize("price", ["50.5", 50.5]) def test_post_with_tax(client: TestClient, price: str | float): response = client.post( "/items/", json={"name": "Foo", "price": price, "description": "Some Foo", "tax": 0.3}, ) assert response.status_code == 200 assert response.json() == {Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 5.8K bytes - Click Count (0) -
docs/es/docs/tutorial/body-nested-models.md
* Conversión de datos * Validación de datos * Documentación automática ## Tipos especiales y validación { #special-types-and-validation } Además de tipos singulares normales como `str`, `int`, `float`, etc., puedes usar tipos singulares más complejos que heredan de `str`. Para ver todas las opciones que tienes, Revisa [Resumen de tipos de Pydantic](https://docs.pydantic.dev/latest/concepts/types/). Verás algunos ejemplos en el siguiente capítulo.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/ru/docs/tutorial/encoder.md
В данном примере она преобразует Pydantic-модель в `dict`, а `datetime` - в `str`. Результатом её вызова является объект, который может быть закодирован с помощью функции из стандартной библиотеки Python – [`json.dumps()`](https://docs.python.org/3/library/json.html#json.dumps).
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 2.6K bytes - Click Count (0) -
docs/fr/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ non annoté /// tip | Astuce Privilégiez la version `Annotated` si possible. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:12:41 GMT 2026 - 4.2K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ non-Annotated /// tip | Dica Utilize a versão com `Annotated` se possível. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:48:53 GMT 2026 - 4.1K bytes - Click Count (0) -
docs/uk/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Оголосіть змінну як str # та отримайте підтримку редактора всередині функції def main(user_id: str): return user_id # Модель Pydantic class User(BaseModel): id: int name: str joined: date ``` Далі це можна використовувати так: ```Python
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 15.1K bytes - Click Count (0)