- Sort Score
- Num 10 results
- Language All
Results 891 - 900 of 1,304 for DEF (0.23 seconds)
-
docs_src/body_multiple_params/tutorial003_an_py39.py
price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( item_id: int, item: Item, user: User, importance: Annotated[int, Body()] ): results = {"item_id": item_id, "item": item, "user": user, "importance": importance}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 575 bytes - Click Count (0) -
docs_src/extra_data_types/tutorial001_an_py39.py
from datetime import datetime, time, timedelta from typing import Annotated, Union from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()], repeat_at: Annotated[Union[time, None], Body()] = None, ):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 801 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial004_py310.py
name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: requiredCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 674 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial004_py39.py
name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: requiredCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 676 bytes - Click Count (0) -
docs_src/response_headers/tutorial002_py39.py
from fastapi import FastAPI, Response app = FastAPI() @app.get("/headers-and-object/") def get_headers(response: Response): response.headers["X-Cat-Dog"] = "alone in the world"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 222 bytes - Click Count (0) -
docs_src/query_params/tutorial002_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 219 bytes - Click Count (0) -
docs_src/request_form_models/tutorial001_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 228 bytes - Click Count (0) -
docs_src/header_params/tutorial003_py39.py
from typing import Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(x_token: Union[list[str], None] = Header(default=None)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 218 bytes - Click Count (0) -
docs_src/body_fields/tutorial001_an_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 563 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial011_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[list[str], None], Query()] = None): query_items = {"q": q}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 237 bytes - Click Count (0)