- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for id (0.13 sec)
-
docs_src/body_nested_models/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 402 bytes - Viewed (0) -
docs_src/body_fields/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 561 bytes - Viewed (0) -
docs_src/response_directly/tutorial001.py
from pydantic import BaseModel class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 505 bytes - Viewed (0) -
docs_src/custom_response/tutorial001.py
from fastapi import FastAPI from fastapi.responses import UJSONResponse app = FastAPI() @app.get("/items/", response_class=UJSONResponse) async def read_items():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 197 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001.py
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: results.update({"q": q}) if item: results.update({"item": item})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 596 bytes - Viewed (0) -
docs_src/templates/tutorial001.py
app.mount("/static", StaticFiles(directory="static"), name="static") templates = Jinja2Templates(directory="templates") @app.get("/items/{id}", response_class=HTMLResponse) async def read_item(request: Request, id: str): return templates.TemplateResponse( request=request, name="item.html", context={"id": id}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Dec 26 20:12:34 GMT 2023 - 521 bytes - Viewed (0) -
docs_src/events/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 283 bytes - Viewed (0) -
docs_src/body_updates/tutorial001.py
} @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.put("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): update_item_encoded = jsonable_encoder(item) items[item_id] = update_item_encoded
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 906 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001.py
app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: Union[time, None] = Body(default=None), ): start_process = start_datetime + process_after duration = end_datetime - start_process return { "item_id": item_id, "start_datetime": start_datetime,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 755 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial001.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", operation_id="some_specific_id_you_define") async def read_items():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 167 bytes - Viewed (0)