Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 513 for depende (0.03 sec)

  1. tests/test_dependency_partial.py

    async def get_partial_function_dependency(
        value: Annotated[
            str, Depends(partial(function_dependency, "partial-function-dependency"))
        ],
    ) -> str:
        return value
    
    
    @app.get("/partial-async-function-dependency")
    async def get_partial_async_function_dependency(
        value: Annotated[
            str,
            Depends(
                partial(async_function_dependency, "partial-async-function-dependency")
            ),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  2. tests/test_dependency_overrides.py

    @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)):
        return {"in": "router-depends", "params": commons}
    
    
    @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)])
    async def router_decorator_depends():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    ## Аннотация типа и `Depends` { #type-annotation-vs-depends }
    
    Обратите внимание, что в приведенном выше коде мы два раза пишем `CommonQueryParams`:
    
    //// tab | Python 3.9+
    
    ```Python
    commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
    ```
    
    ////
    
    //// tab | Python 3.9+ non-Annotated
    
    /// tip | Подсказка
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  4. docs/es/docs/tutorial/dependencies/classes-as-dependencies.md

    ## Anotación de tipos vs `Depends` { #type-annotation-vs-depends }
    
    Nota cómo escribimos `CommonQueryParams` dos veces en el código anterior:
    
    //// tab | Python 3.9+
    
    ```Python
    commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
    ```
    
    ////
    
    //// tab | Python 3.9+ sin `Annotated`
    
    /// tip | Consejo
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  5. tests/test_dependency_contextmanager.py

    
    @app.get("/async")
    async def get_async(state: str = Depends(asyncgen_state)):
        return state
    
    
    @app.get("/sync")
    async def get_sync(state: str = Depends(generator_state)):
        return state
    
    
    @app.get("/async_raise")
    async def get_async_raise(state: str = Depends(asyncgen_state_try)):
        assert state == "asyncgen raise started"
        raise AsyncDependencyError()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. tests/test_dependency_class.py

    ):
        return await instance(value)
    
    
    @app.get("/async-callable-gen-dependency-class")
    async def get_async_callable_gen_dependency_class(
        value: str, instance: AsyncCallableGenDependency = Depends()
    ):
        return await instance(value).__anext__()
    
    
    @app.get("/callable-dependency")
    async def get_callable_dependency(value: str = Depends(callable_dependency)):
        return value
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  7. docs/en/docs/reference/dependencies.md

    # Dependencies - `Depends()` and `Security()`
    
    ## `Depends()`
    
    Dependencies are handled mainly with the special function `Depends()` that takes a callable.
    
    Here is the reference for it and its parameters.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Depends
    ```
    
    ::: fastapi.Depends
    
    ## `Security()`
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 671 bytes
    - Viewed (0)
  8. api/maven-api-core/src/main/java/org/apache/maven/api/SourceRoot.java

        /**
         * {@return the root directory where the sources are stored}
         * The path is relative to the <abbr>POM</abbr> file.
         *
         * <h4>Default implementation</h4>
         * The default value depends on whether a {@linkplain #module() module name} is specified in this source root:
         * <ul>
         *   <li>
         *     If no module name, then the default directory is
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Nov 07 13:11:07 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    O **FastAPI** garantirá que o "código de saída" em cada dependência com `yield` é executado na ordem correta.
    
    Por exemplo, `dependency_c` pode depender de `dependency_b`, e `dependency_b` depender de `dependency_a`:
    
    {* ../../docs_src/dependencies/tutorial008_an_py39.py hl[6,14,22] *}
    
    E todas elas podem utilizar `yield`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  10. docs_src/sql_databases/tutorial002_py39.py

    @app.post("/heroes/", response_model=HeroPublic)
    def create_hero(hero: HeroCreate, session: Session = Depends(get_session)):
        db_hero = Hero.model_validate(hero)
        session.add(db_hero)
        session.commit()
        session.refresh(db_hero)
        return db_hero
    
    
    @app.get("/heroes/", response_model=list[HeroPublic])
    def read_heroes(
        session: Session = Depends(get_session),
        offset: int = 0,
        limit: int = Query(default=100, le=100),
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top