Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 31 for common_parameters (0.17 sec)

  1. docs/ja/docs/tutorial/dependencies/index.md

    * 依存関係("dependable")関数を正しいパラメータで呼び出します。
    * 関数の結果を取得します。
    * *path operation関数*のパラメータにその結果を代入してください。
    
    ```mermaid
    graph TB
    
    common_parameters(["common_parameters"])
    read_items["/items/"]
    read_users["/users/"]
    
    common_parameters --> read_items
    common_parameters --> read_users
    ```
    
    この方法では、共有されるコードを一度書き、**FastAPI** が*path operations*のための呼び出しを行います。
    
    !!! check "確認"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:08:16 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md

    实际上 FastAPI 检查的是它是一个 "可调用对象"(函数,类或其他任何类型)以及定义的参数。
    
    如果您在 **FastAPI** 中传递一个 "可调用对象" 作为依赖项,它将分析该 "可调用对象" 的参数,并以处理路径操作函数的参数的方式来处理它们。包括子依赖项。
    
    这也适用于完全没有参数的可调用对象。这与不带参数的路径操作函数一样。
    
    所以,我们可以将上面的依赖项 "可依赖对象" `common_parameters` 更改为类 `CommonQueryParams`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="9-13"
        {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="11-15"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/dependencies/classes-as-dependencies.md

    🚥 👆 🚶‍♀️ "🇧🇲" 🔗 **FastAPI**, ⚫️ 🔜 🔬 🔢 👈 "🇧🇲", & 🛠️ 👫 🎏 🌌 🔢 *➡ 🛠️ 🔢*. ✅ 🎧-🔗.
    
    👈 ✔ 🇧🇲 ⏮️ 🙅‍♂ 🔢 🌐. 🎏 ⚫️ 🔜 *➡ 🛠️ 🔢* ⏮️ 🙅‍♂ 🔢.
    
    ⤴️, 👥 💪 🔀 🔗 "☑" `common_parameters` ⚪️➡️ 🔛 🎓 `CommonQueryParams`:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    Это относится и к вызываемым объектам без параметров. Работа с ними происходит точно так же, как и для *функций операции пути* без параметров.
    
    Теперь мы можем изменить зависимость `common_parameters`, указанную выше, на класс `CommonQueryParams`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 12 11:12:19 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md

    それは、パラメータが全くない呼び出し可能なものにも適用されます。パラメータのない*path operation関数*と同じように。
    
    そこで、上で紹介した依存関係の`common_parameters`を`CommonQueryParams`クラスに変更します:
    
    ```Python hl_lines="11 12 13 14 15"
    {!../../../docs_src/dependencies/tutorial002.py!}
    ```
    
    クラスのインスタンスを作成するために使用される`__init__`メソッドに注目してください:
    
    ```Python hl_lines="12"
    {!../../../docs_src/dependencies/tutorial002.py!}
    ```
    
    ...以前の`common_parameters`と同じパラメータを持っています:
    
    ```Python hl_lines="8"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:08:16 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    That also applies to callables with no parameters at all. The same as it would be for *path operation functions* with no parameters.
    
    Then, we can change the dependency "dependable" `common_parameters` from above to the class `CommonQueryParams`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    Das gilt auch für Callables ohne Parameter. So wie es auch für *Pfadoperation-Funktionen* ohne Parameter gilt.
    
    Dann können wir das „Dependable“ `common_parameters` der Abhängigkeit von oben in die Klasse `CommonQueryParams` ändern:
    
    === "Python 3.10+"
    
        ```Python hl_lines="11-15"
        {!> ../../../docs_src/dependencies/tutorial002_an_py310.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:01:58 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md

        {!> ../../../docs_src/dependencies/tutorial002.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
        ```
    
    ...이전 `common_parameters`와 동일한 매개변수를 가집니다:
    
    === "파이썬 3.6 이상"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    === "파이썬 3.10 이상"
    
        ```Python hl_lines="6"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. fastapi/param_functions.py

        from fastapi import Depends, FastAPI
    
        app = FastAPI()
    
    
        async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):
            return {"q": q, "skip": skip, "limit": limit}
    
    
        @app.get("/items/")
        async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
            return commons
        ```
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/MediaType.kt

     * limitations under the License.
     */
    package okhttp3
    
    import java.nio.charset.Charset
    import okhttp3.internal.commonEquals
    import okhttp3.internal.commonHashCode
    import okhttp3.internal.commonParameter
    import okhttp3.internal.commonToMediaType
    import okhttp3.internal.commonToMediaTypeOrNull
    import okhttp3.internal.commonToString
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top