- Sort Score
- Result 10 results
- Languages All
Results 1341 - 1350 of 1,962 for fastapi (0.05 sec)
-
docs_src/schema_extra_example/tutorial004_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jul 01 16:43:29 UTC 2023 - 965 bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Body, FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 582 bytes - Viewed (0) -
docs_src/extra_models/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserBase(BaseModel): username: str email: EmailStr full_name: str | None = None class UserIn(UserBase): password: str class UserOut(UserBase): pass class UserInDB(UserBase): hashed_password: str def fake_password_hasher(raw_password: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 792 bytes - Viewed (0) -
docs_src/extra_models/tutorial003.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class BaseItem(BaseModel): description: str type: str class CarItem(BaseItem): type: str = "car" class PlaneItem(BaseItem): type: str = "plane" size: int items = { "item1": {"description": "All my friends drive a low rider", "type": "car"}, "item2": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 644 bytes - Viewed (0) -
tests/test_validate_response_recursive/app_pv1.py
from typing import List from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class RecursiveItem(BaseModel): sub_items: List["RecursiveItem"] = [] name: str RecursiveItem.update_forward_refs() class RecursiveSubitemInSubmodel(BaseModel): sub_items2: List["RecursiveItemViaSubmodel"] = [] name: str class RecursiveItemViaSubmodel(BaseModel):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.1K bytes - Viewed (0) -
fastapi/dependencies/utils.py
value_is_sequence, ) from fastapi.background import BackgroundTasks from fastapi.concurrency import ( asynccontextmanager, contextmanager_in_threadpool, ) from fastapi.dependencies.models import Dependant, SecurityRequirement from fastapi.logger import logger from fastapi.security.base import SecurityBase from fastapi.security.oauth2 import OAuth2, SecurityScopes from fastapi.security.open_id_connect_url import OpenIdConnect
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/events.md
No nosso exemplo de código acima, nós não usamos ele diretamente, mas nós passamos para o FastAPI para ele usá-lo. O parâmetro `lifespan` da aplicação `FastAPI` usa um **Gerenciador de Contexto Assíncrono**, então nós podemos passar nosso novo gerenciador de contexto assíncrono do `lifespan` para ele. ```Python hl_lines="22"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/de/docs/tutorial/body-nested-models.md
# Body – Verschachtelte Modelle Mit **FastAPI** können Sie (dank Pydantic) beliebig tief verschachtelte Modelle definieren, validieren und dokumentieren. ## Listen als Felder Sie können ein Attribut als Kindtyp definieren, zum Beispiel eine Python-`list`e. //// tab | Python 3.10+ ```Python hl_lines="12" {!> ../../docs_src/body_nested_models/tutorial001_py310.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="14"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.3K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
In our code example above, we don't use it directly, but we pass it to FastAPI for it to use it. The `lifespan` parameter of the `FastAPI` app takes an **async context manager**, so we can pass our new `lifespan` async context manager to it. {* ../../docs_src/events/tutorial003.py hl[22] *} ## Alternative Events (deprecated)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
/// tip There is an official project generator with **FastAPI** and **PostgreSQL** including a frontend and more tools: <a href="https://github.com/fastapi/full-stack-fastapi-template" class="external-link" target="_blank">https://github.com/fastapi/full-stack-fastapi-template</a> ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.7K bytes - Viewed (0)