- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for fake_items_db (0.18 sec)
-
docs_src/dependencies/tutorial002_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: 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: CommonQueryParams = Depends(CommonQueryParams)): response = {}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 624 bytes - Viewed (0)