Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 848 for Dependencies (0.08 seconds)

  1. docs/zh-hant/docs/tutorial/dependencies/global-dependencies.md

    # 全域依賴 { #global-dependencies }
    
    在某些類型的應用程式中,你可能想為整個應用程式新增依賴。
    
    類似於你可以在[路徑操作(path operation)的裝飾器中新增 `dependencies`](dependencies-in-path-operation-decorators.md) 的方式,你也可以把它們加到 `FastAPI` 應用程式上。
    
    在這種情況下,它們會套用到應用程式中的所有路徑操作:
    
    {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}
    
    而且,在[將 `dependencies` 新增到路徑操作裝飾器](dependencies-in-path-operation-decorators.md) 那一節中的所有概念依然適用,只是這裡是套用到整個應用中的所有路徑操作。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/dependencies/sub-dependencies.md

    # Sub-dependencies { #sub-dependencies }
    
    You can create dependencies that have **sub-dependencies**.
    
    They can be as **deep** as you need them to be.
    
    **FastAPI** will take care of solving them.
    
    ## First dependency "dependable" { #first-dependency-dependable }
    
    You could create a first dependency ("dependable") like:
    
    {* ../../docs_src/dependencies/tutorial005_an_py310.py hl[8:9] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  3. docs/ja/docs/advanced/advanced-dependencies.md

    この場合、レスポンスの送信が終わるまでデータベースセッションが保持されますが、使わないのであれば保持する必要はありません。
    
    次のようになります:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py *}
    
    終了コード、すなわち `Session` の自動クローズは:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[19:21] *}
    
    ...の部分で定義されており、遅いデータ送信が終わった後に実行されます:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[30:38] hl[31:33] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 11.4K bytes
    - Click Count (0)
  4. docs/en/docs/advanced/advanced-dependencies.md

    # Advanced Dependencies { #advanced-dependencies }
    
    ## Parameterized dependencies { #parameterized-dependencies }
    
    All the dependencies we have seen are a fixed function or class.
    
    But there could be cases where you want to be able to set parameters on the dependency, without having to declare many different functions or classes.
    
    Let's imagine that we want to have a dependency that checks if the query parameter `q` contains some fixed content.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/testing-dependencies.md

    # Testing Dependencies with Overrides { #testing-dependencies-with-overrides }
    
    ## Overriding dependencies during testing { #overriding-dependencies-during-testing }
    
    There are some scenarios where you might want to override a dependency during testing.
    
    You don't want the original dependency to run (nor any of the sub-dependencies it might have).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  6. docs/ja/docs/tutorial/dependencies/global-dependencies.md

    # グローバルな依存関係 { #global-dependencies }
    
    アプリケーションの種類によっては、アプリ全体に依存関係を追加したい場合があります。
    
    [`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)できるのと同様に、`FastAPI` アプリケーション自体にも追加できます。
    
    その場合、アプリケーション内のすべての path operation に適用されます:
    
    {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  7. docs/zh/docs/advanced/testing-dependencies.md

    # 使用覆盖测试依赖项 { #testing-dependencies-with-overrides }
    
    ## 测试时覆盖依赖项 { #overriding-dependencies-during-testing }
    
    有些场景下,您可能需要在测试时覆盖依赖项。
    
    即不希望运行原有依赖项(及其子依赖项)。
    
    反之,要在测试期间(或只是为某些特定测试)提供只用于测试的依赖项,并使用此依赖项的值替换原有依赖项的值。
    
    ### 用例:外部服务 { #use-cases-external-service }
    
    常见实例是调用外部第三方身份验证应用。
    
    向第三方应用发送令牌,然后返回经验证的用户。
    
    但第三方服务商处理每次请求都可能会收费,并且耗时通常也比调用写死的模拟测试用户更长。
    
    一般只要测试一次外部验证应用就够了,不必每次测试都去调用。
    
    此时,最好覆盖调用外部验证应用的依赖项,使用返回模拟测试用户的自定义依赖项就可以了。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 2K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/advanced/testing-dependencies.md

    # 用覆寫測試相依 { #testing-dependencies-with-overrides }
    
    ## 在測試期間覆寫相依 { #overriding-dependencies-during-testing }
    
    有些情境你可能想在測試時覆寫(override)某個相依(dependency)。
    
    你不希望執行原本的相依(以及它可能具有的任何子相依)。
    
    相反地,你想提供一個只在測試期間使用的不同相依(可能只在特定測試中),並回傳一個可以在原本相依值被使用之處使用的值。
    
    ### 使用情境:外部服務 { #use-cases-external-service }
    
    例如你有一個需要呼叫的外部驗證提供者。
    
    你傳送一個 token,它會回傳一個已驗證的使用者。
    
    這個提供者可能按每個請求收費,而且呼叫它可能比在測試中使用固定的模擬使用者多花一些時間。
    
    你大概只想對外部提供者測試一次,而不需要在每個測試都呼叫它。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  9. build-tools-internal/src/main/groovy/elasticsearch.forbidden-dependencies.gradle

     * 2.0 and the Server Side Public License, v 1; you may not use this file except
     * in compliance with, at your election, the Elastic License 2.0 or the Server
     * Side Public License, v 1.
     */
    
    // we do not want any of these dependencies on the compilation classpath
    // because they could then be used within Elasticsearch
    List<String> FORBIDDEN_DEPENDENCIES = [
      'guava'
    ]
    
    Closure checkDeps = { Configuration configuration ->
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 1.3K bytes
    - Click Count (0)
  10. docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md

    그러면 위의 의존성("dependable") `common_parameters`를 클래스 `CommonQueryParams`로 바꿀 수 있습니다:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[11:15] *}
    
    클래스의 인스턴스를 만들 때 사용하는 `__init__` 메서드에 주목하세요:
    
    {* ../../docs_src/dependencies/tutorial002_an_py310.py hl[12] *}
    
    ...이전의 `common_parameters`와 동일한 매개변수를 가지고 있습니다:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8] *}
    
    이 매개변수들이 **FastAPI**가 의존성을 "해결"하는 데 사용할 것들입니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 8K bytes
    - Click Count (0)
Back to Top