- Sort Score
- Result 10 results
- Languages All
Results 751 - 760 of 1,127 for def2 (0.02 sec)
-
docs_src/response_cookies/tutorial001.py
from fastapi import FastAPI from fastapi.responses import JSONResponse app = FastAPI() @app.post("/cookie/") def create_cookie(): content = {"message": "Come to the dark side, we have cookies"} response = JSONResponse(content=content) response.set_cookie(key="fakesession", value="fake-cookie-session-value")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 344 bytes - Viewed (0) -
tests/test_modules_same_name_body/app/b.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 161 bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001_an_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: Annotated[Union[str, None], Body()] = None, size: Annotated[Union[int, None], Body()] = None, ): if item_id in items: item = items[item_id]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 705 bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 611 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001.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:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 596 bytes - Viewed (0) -
docs_src/custom_response/tutorial006b.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/fastapi", response_class=RedirectResponse) async def redirect_fastapi():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jul 03 19:51:28 UTC 2021 - 220 bytes - Viewed (0) -
docs_src/custom_response/tutorial009.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 202 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial003.py
{"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", ) @app.get("/app") def read_main(request: Request):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 10 17:28:18 UTC 2020 - 405 bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial001_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 362 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 329 bytes - Viewed (0)