Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for query_extractor (0.21 sec)

  1. docs/en/docs/tutorial/dependencies/sub-dependencies.md

    But **FastAPI** will know that it has to solve `query_extractor` first, to pass the results of that to `query_or_cookie_extractor` while calling it.
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/dependencies/sub-dependencies.md

    👀 👈 👥 🕴 📣 1️⃣ 🔗 *➡ 🛠️ 🔢*, `query_or_cookie_extractor`.
    
    ✋️ **FastAPI** 🔜 💭 👈 ⚫️ ✔️ ❎ `query_extractor` 🥇, 🚶‍♀️ 🏁 👈 `query_or_cookie_extractor` ⏪ 🤙 ⚫️.
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    ## ⚙️ 🎏 🔗 💗 🕰
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/dependencies/sub-dependencies.md

    Aber **FastAPI** wird wissen, dass es zuerst `query_extractor` auflösen muss, um dessen Resultat `query_or_cookie_extractor` zu übergeben, wenn dieses aufgerufen wird.
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial005_an.py

    from typing import Union
    
    from fastapi import Cookie, Depends, FastAPI
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 558 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial005_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 529 bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/dependencies/sub-dependencies.md

    Но **FastAPI** будет знать, что сначала он должен выполнить `query_extractor`, чтобы передать результаты этого в `query_or_cookie_extractor` при его вызове.
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/dependencies/sub-dependencies.md

    Mas o **FastAPI** saberá que precisa solucionar `query_extractor` primeiro, para passar o resultado para `query_or_cookie_extractor` enquanto chama a função.
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/dependencies/sub-dependencies.md

    *path operation関数*の中で宣言している依存関係は`query_or_cookie_extractor`の1つだけであることに注意してください。
    
    しかし、**FastAPI** は`query_extractor`を最初に解決し、その結果を`query_or_cookie_extractor`を呼び出す時に渡す必要があることを知っています。
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    ## 同じ依存関係の複数回の使用
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/dependencies/sub-dependencies.md

    注意,这里在*路径操作函数*中只声明了一个依赖项,即 `query_or_cookie_extractor` 。
    
    但 **FastAPI** 必须先处理 `query_extractor`,以便在调用 `query_or_cookie_extractor` 时使用 `query_extractor` 返回的结果。
    
    ///
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    query_extractor --> query_or_cookie_extractor --> read_query
    ```
    
    ## 多次使用同一个依赖项
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial005_py310.py

    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: str | None = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None)
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 443 bytes
    - Viewed (0)
Back to top