- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for Read (0.32 sec)
-
docs_src/extra_models/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 644 bytes - Viewed (1) -
docs_src/dependencies/tutorial003.py
class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 635 bytes - Viewed (0) -
docs_src/handling_errors/tutorial003.py
return JSONResponse( status_code=418, content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."}, ) @app.get("/unicorns/{name}") async def read_unicorn(name: str): if name == "yolo": raise UnicornException(name=name)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 626 bytes - Viewed (0) -
docs_src/additional_responses/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 837 bytes - Viewed (0) -
docs_src/path_params/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 236 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 148 bytes - Viewed (0) -
docs_src/configure_swagger_ui/tutorial003.py
from fastapi import FastAPI app = FastAPI(swagger_ui_parameters={"deepLinking": False}) @app.get("/users/{username}") async def read_user(username: str):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 201 bytes - Viewed (0) -
docs_src/app_testing/tutorial003.py
@app.on_event("startup") async def startup_event(): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 528 bytes - Viewed (0) -
docs_src/query_params/tutorial003.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: Union[str, None] = None, short: bool = False): item = {"item_id": item_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 406 bytes - Viewed (0) -
docs_src/security/tutorial003.py
raise HTTPException(status_code=400, detail="Incorrect username or password") return {"access_token": user.username, "token_type": "bearer"} @app.get("/users/me") async def read_users_me(current_user: User = Depends(get_current_active_user)):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 2.4K bytes - Viewed (0)