- Sort Score
- Result 10 results
- Languages All
Results 191 - 200 of 513 for dictId (0.06 sec)
-
docs/uk/docs/python-types.md
* Змінна `items_s` це `set`, і кожен його елемент типу `bytes`. #### Dict (словник) Щоб оголосити `dict`, вам потрібно передати 2 параметри типу, розділені комами. Перший параметр типу для ключа у `dict`. Другий параметр типу для значення у `dict`: //// tab | Python 3.8 і вище ```Python hl_lines="1 4" {!> ../../docs_src/python_types/tutorial008.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.5K bytes - Viewed (0) -
tests/test_serialize_response_model.py
from typing import Dict, List, Optional from fastapi import FastAPI from pydantic import BaseModel, Field from starlette.testclient import TestClient app = FastAPI() class Item(BaseModel): name: str = Field(alias="aliased_name") price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/valid", response_model=Item) def get_valid(): return Item(aliased_name="valid", price=1.0)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 4.2K bytes - Viewed (0) -
tests/test_additional_properties.py
from typing import Dict from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Items(BaseModel): items: Dict[str, int] @app.post("/foo") def foo(items: Items): return items.items client = TestClient(app) def test_additional_properties_post(): response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.6K bytes - Viewed (0) -
docs_src/python_types/tutorial008.py
from typing import Dict def process_items(prices: Dict[str, float]): for item_name, item_price in prices.items(): print(item_name)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jan 16 14:44:08 UTC 2022 - 171 bytes - Viewed (0) -
docs/pt/docs/python-types.md
* A variável `items_s` é um `set`, e cada um de seus itens é do tipo `bytes`. #### Dict Para definir um `dict`, você passa 2 parâmetros de tipo, separados por vírgulas. O primeiro parâmetro de tipo é para as chaves do `dict`. O segundo parâmetro de tipo é para os valores do `dict`: //// tab | Python 3.9+ ```Python hl_lines="1" {!> ../../docs_src/python_types/tutorial008_py39.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 12:32:27 UTC 2024 - 18K bytes - Viewed (0) -
fastapi/param_functions.py
from typing import Any, Callable, Dict, List, Optional, Sequence, Union from fastapi import params from fastapi._compat import Undefined from fastapi.openapi.models import Example from typing_extensions import Annotated, Doc, deprecated _Unset: Any = Undefined def Path( # noqa: N802 default: Annotated[ Any, Doc( """ Default value if the parameter field is not set.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 62.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-updates.md
/// ### Использование параметра `exclude_unset` в Pydantic Если необходимо выполнить частичное обновление, то очень полезно использовать параметр `exclude_unset` в методе `.dict()` модели Pydantic. Например, `item.dict(exclude_unset=True)`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-updates.md
/// info | Informação No Pydantic v1, o método que era chamado `.dict()` e foi depreciado (mas ainda suportado) no Pydantic v2. Agora, deve-se usar o método `.model_dump()`. Os exemplos aqui usam `.dict()` para compatibilidade com o Pydantic v1, mas você deve usar `.model_dump()` a partir do Pydantic v2. /// Isso gera um `dict` com apenas os dados definidos ao criar o modelo `item`, excluindo os valores padrão.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 14 09:16:06 UTC 2024 - 6K bytes - Viewed (0) -
docs/en/docs/tutorial/body-updates.md
/// info In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`. The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. /// That would generate a `dict` with only the data that was set when creating the `item` model, excluding default values.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
.github/actions/people/app/main.py
tiers: DefaultDict[float, Dict[str, SponsorEntity]] = defaultdict(dict) for node in nodes: tiers[node.tier.monthlyPriceInDollars][node.sponsorEntity.login] = ( node.sponsorEntity ) return tiers def get_top_users( *, counter: Counter, authors: Dict[str, Author], skip_users: Container[str], min_count: int = 2,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 19.2K bytes - Viewed (1)