- Sort Score
- Num 10 results
- Language All
Results 371 - 380 of 789 for asyncio (0.04 seconds)
-
docs_src/custom_response/tutorial004_py39.py
<body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200) @app.get("/items/", response_class=HTMLResponse) async def read_items():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 491 bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial005_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 331 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial002_an_py310.py
from fastapi import FastAPI from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: str | None = None size: float app = FastAPI() @app.post("/items/") async def create_item(item: Item) -> Item:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 252 bytes - Click Count (0) -
docs_src/additional_status_codes/tutorial001_py39.py
from fastapi.responses import JSONResponse app = FastAPI() items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Union[str, None] = Body(default=None), size: Union[int, None] = Body(default=None), ): if item_id in items: item = items[item_id] item["name"] = name
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 684 bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial001_py39.py
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 = Path(title="The ID of the item to get", ge=0, le=1000), q: Union[str, None] = None, item: Union[Item, None] = None, ): results = {"item_id": item_id} if q:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 596 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial007_pv1_py39.py
@app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.schema()}}, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 767 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial007_py39.py
@app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 797 bytes - Click Count (0) -
docs_src/query_params/tutorial002_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 251 bytes - Click Count (0) -
docs_src/request_form_models/tutorial001_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Sep 05 15:16:50 GMT 2024 - 268 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial004_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 373 bytes - Click Count (0)