- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for Timmons (0.07 sec)
-
docs_src/dependencies/tutorial003_an_py310.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[Any, Depends(CommonQueryParams)]): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 655 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_02_an_py310.py
CommonsDep = Annotated[dict, Depends(common_parameters)] @app.get("/items/") async def read_items(commons: CommonsDep): return commons @app.get("/users/") async def read_users(commons: CommonsDep):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 447 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` === "Python 3.8+ non-Annotated" !!! tip Prefer to use the `Annotated` version if possible. ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` ...you write: === "Python 3.8+" ```Python commons: Annotated[CommonQueryParams, Depends()]
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 11.4K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_py310.py
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)): return {"message": "Hello Users!", "params": commons} client = TestClient(app) async def override_dependency(q: str | None = None):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.4K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an.py
@app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons} client = TestClient(app)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/index.md
В приведенном выше примере есть небольшое **повторение кода**. Когда вам нужно использовать `common_parameters()` зависимость, вы должны написать весь параметр с аннотацией типов и `Depends()`: ```Python commons: Annotated[dict, Depends(common_parameters)] ``` Но потому что мы используем `Annotated`, мы можем хранить `Annotated` значение в переменной и использовать его в нескольких местах: === "Python 3.10+"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 17.7K bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an_py310.py
self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 664 bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an.py
self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 706 bytes - Viewed (0) -
docs_src/dependencies/tutorial001.py
): 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)):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 442 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_an_py39.py
): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return commons @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 473 bytes - Viewed (0)