- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for BaseModel (0.1 sec)
-
docs/en/docs/tutorial/body.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:58:19 UTC 2024 - 6.6K bytes - Viewed (0) -
docs/fr/docs/tutorial/body.md
/// ## Importez le `BaseModel` de Pydantic Commencez par importer la classe `BaseModel` du module `pydantic` : {* ../../docs_src/body/tutorial001.py hl[4] *} ## Créez votre modèle de données Déclarez ensuite votre modèle de données en tant que classe qui hérite de `BaseModel`. Utilisez les types Python standard pour tous les attributs :
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:34:41 UTC 2024 - 7.6K bytes - Viewed (0) -
fastapi/dependencies/utils.py
return True # If it's a Form (or File) field, it has to be a BaseModel to be top level # otherwise it has to be embedded, so that the key value pair can be extracted if isinstance(first_field.field_info, params.Form) and not lenient_issubclass( first_field.type_, BaseModel ): return True return False async def _extract_form_body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 34.7K bytes - Viewed (0) -
docs/pt/docs/advanced/dataclasses.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 17:33:53 UTC 2024 - 4.4K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
{* ../../docs_src/dataclasses/tutorial001.py hl[1,7:12,19:20] *} This is still supported thanks to **Pydantic**, as it has <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel" class="external-link" target="_blank">internal support for `dataclasses`</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:35:06 UTC 2024 - 4K bytes - Viewed (0) -
README.md
Declare the body using standard Python types, thanks to Pydantic. ```Python hl_lines="4 9-12 25-27" from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Oct 31 09:13:26 UTC 2024 - 23.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
Use Pydantic models for `Query` parameters: ```python from typing import Annotated, Literal from fastapi import FastAPI, Query from pydantic import BaseModel, Field app = FastAPI() class FilterParams(BaseModel): limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = []
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0)