- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Timmons (0.09 sec)
-
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/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) -
tests/test_dependency_overrides.py
@app.get("/main-depends/") async def main_depends(commons: dict = Depends(common_parameters)): return {"in": "main-depends", "params": commons} @app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends(): return {"in": "decorator-depends"} @router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
When you need to use the `common_parameters()` dependency, you have to write the whole parameter with the type annotation and `Depends()`: ```Python commons: Annotated[dict, Depends(common_parameters)] ``` But because we are using `Annotated`, we can store that `Annotated` value in a variable and use it in multiple places: === "Python 3.10+"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/index.md
## `Annotated`인 의존성 공유하기 위의 예제에서 몇몇 작은 **코드 중복**이 있다는 것을 보았을 겁니다. `common_parameters()`의존을 사용해야 한다면, 타입 명시와 `Depends()`와 함께 전체 매개변수를 적어야 합니다: ```Python commons: Annotated[dict, Depends(common_parameters)] ``` 하지만 `Annotated`를 사용하고 있기에, `Annotated` 값을 변수에 저장하고 여러 장소에서 사용할 수 있습니다: === "Python 3.10+" ```Python hl_lines="12 16 21"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 13.6K bytes - Viewed (0)