- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 91 for dependable (0.16 seconds)
-
docs/en/docs/tutorial/dependencies/sub-dependencies.md
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] *} It declares an optional query parameter `q` as a `str`, and then it just returns it.
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) -
docs/en/docs/tutorial/dependencies/index.md
Let's see a very simple example. It will be so simple that it is not very useful, for now. But this way we can focus on how the **Dependency Injection** system works. ### Create a dependency, or "dependable" { #create-a-dependency-or-dependable } Let's first focus on the dependency. It is just a function that can take all the same parameters that a *path operation function* can take:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9.5K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
## A `dict` from the previous example { #a-dict-from-the-previous-example } In the previous example, we were returning a `dict` from our dependency ("dependable"): {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *} But then we get a `dict` in the parameter `commons` of the *path operation function*.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 6.8K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/dependencies/classes-as-dependencies.md
# 以類別作為相依性 { #classes-as-dependencies } 在更深入了解 **相依性注入(Dependency Injection)** 系統之前,我們先把前一個範例升級一下。 ## 前一個範例中的 `dict` { #a-dict-from-the-previous-example } 在前一個範例中,我們從相依項("dependable")回傳了一個 `dict`: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *} 但接著我們在路徑操作函式(*path operation function*)的參數 `commons` 中取得的是一個 `dict`。 而我們知道,編輯器對 `dict` 無法提供太多輔助(例如自動完成),因為它無法預先知道其中的鍵與值的型別。 我們可以做得更好...Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md
# 의존성으로서의 클래스 { #classes-as-dependencies } **의존성 주입** 시스템에 대해 더 깊이 살펴보기 전에, 이전 예제를 업그레이드해 보겠습니다. ## 이전 예제의 `dict` { #a-dict-from-the-previous-example } 이전 예제에서는 의존성("dependable")에서 `dict`를 반환하고 있었습니다: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *} 하지만 그러면 *경로 처리 함수*의 매개변수 `commons`에서 `dict`를 받게 됩니다. 그리고 에디터는 `dict`의 키와 값 타입을 알 수 없기 때문에 `dict`에 대해서는 (완성 기능 같은) 많은 지원을 제공할 수 없다는 것을 알고 있습니다. 더 나은 방법이 있습니다...Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 8K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/index.md
これらすべてを、コードの繰り返しを最小限に抑えながら行います。 ## 最初のステップ { #first-steps } 非常にシンプルな例を見てみましょう。あまりにもシンプルなので、今のところはあまり参考にならないでしょう。 しかし、この方法では **Dependency Injection** システムがどのように機能するかに焦点を当てることができます。 ### 依存関係(「dependable」)の作成 { #create-a-dependency-or-dependable } まずは依存関係に注目してみましょう。 以下のように、*path operation 関数*と同じパラメータを全て取ることができる関数にすぎません: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[8:9] *} これだけです。 **2行**。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/background-tasks.md
* 依序傳給任務函式的位置引數(`email`)。 * 要傳給任務函式的關鍵字引數(`message="some notification"`)。 ## 相依性注入 { #dependency-injection } 在相依性注入系統中也可使用 `BackgroundTasks`。你可以在多個層級宣告 `BackgroundTasks` 型別的參數:路徑操作函式、相依項(dependable)、次級相依項等。 **FastAPI** 會在各種情況下正確處理並重用同一個物件,將所有背景任務合併,並在之後於背景執行: {* ../../docs_src/background_tasks/tutorial002_an_py310.py hl[13,15,22,25] *} 在此範例中,訊息會在回應送出之後寫入 `log.txt` 檔案。 如果請求中有查詢參數,會以背景任務寫入日誌。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.1K bytes - Click Count (0) -
docs/en/docs/tutorial/background-tasks.md
Using `BackgroundTasks` also works with the dependency injection system, you can declare a parameter of type `BackgroundTasks` at multiple levels: in a *path operation function*, in a dependency (dependable), in a sub-dependency, etc. **FastAPI** knows what to do in each case and how to reuse the same object, so that all the background tasks are merged together and are run in the background afterwards:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.7K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md
# 依存関係としてのクラス { #classes-as-dependencies } **依存性注入** システムを深く掘り下げる前に、先ほどの例をアップグレードしてみましょう。 ## 前の例の`dict` { #a-dict-from-the-previous-example } 前の例では、依存関係("dependable")から`dict`を返していました: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *} しかし、*path operation関数*のパラメータ`commons`に`dict`が含まれています。 また、エディタは`dict`のキーと値の型を知ることができないため、多くのサポート(補完のような)を提供することができません。 もっとうまくやれるはずです...。 ## 依存関係を作るもの { #what-makes-a-dependency }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/ja/docs/tutorial/background-tasks.md
* タスク関数に順番に渡す必要のある引数の列 (`email`)。 * タスク関数に渡す必要のあるキーワード引数 (`message="some notification"`)。 ## 依存性注入 { #dependency-injection } `BackgroundTasks` の使用は依存性注入システムでも機能し、様々な階層 (*path operation function*、依存性 (dependable)、サブ依存性など) で `BackgroundTasks` 型のパラメーターを宣言できます。 **FastAPI** は、それぞれの場合の処理方法と同じオブジェクトの再利用方法を知っているため、すべてのバックグラウンドタスクがマージされ、バックグラウンドで後で実行されます: {* ../../docs_src/background_tasks/tutorial002_an_py310.py hl[13,15,22,25] *}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 5.8K bytes - Click Count (0)