- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for comment (0.2 sec)
-
docs_src/response_headers/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 309 bytes - Viewed (0) -
docs_src/dependencies/tutorial001.py
app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return commons @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 442 bytes - Viewed (0) -
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")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 344 bytes - Viewed (0) -
docs_src/response_directly/tutorial001.py
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/background_tasks/tutorial001.py
from fastapi import BackgroundTasks, FastAPI app = FastAPI() def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 519 bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001.py
app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 1.5K bytes - Viewed (0) -
docs_src/additional_responses/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 26 13:32:30 GMT 2022 - 506 bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 684 bytes - Viewed (0)