- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for __enter__ (0.04 sec)
-
docs/es/docs/tutorial/dependencies/dependencies-with-yield.md
/// En Python, puedes crear Context Managers <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">creando una clase con dos métodos: `__enter__()` y `__exit__()`</a>. También puedes usarlos dentro de las dependencias de **FastAPI** con `yield` usando `with` o `async with` en la función de dependencia:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.7K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md
这是一个更为"高级"的想法。 如果你刚开始使用 **FastAPI** ,你可以暂时可以跳过它。 /// 在Python中,你可以通过<a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">创建一个带有`__enter__()`和`__exit__()`方法的类</a>来创建上下文管理器。 你也可以在 **FastAPI** 的 `yield` 依赖项中通过 `with` 或者 `async with` 语句来使用它们: {* ../../docs_src/dependencies/tutorial010.py hl[1:9,13] *} /// tip | 提示 另一种创建上下文管理器的方法是:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 11.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
これは多かれ少なかれ、「高度な」発想です。 **FastAPI** を使い始めたばかりの方は、とりあえずスキップした方がよいかもしれません。 /// Pythonでは、<a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">以下の2つのメソッドを持つクラスを作成する: `__enter__()`と`__exit__()`</a>ことでコンテキストマネージャを作成することができます。 また、依存関数の中で`with`や`async with`文を使用することによって`yield`を持つ **FastAPI** の依存関係の中でそれらを使用することができます: {* ../../docs_src/dependencies/tutorial010.py hl[1,2,3,4,5,6,7,8,9,13] *}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 12.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md
/// В Python можно создавать менеджеры контекста, <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">создав класс с двумя методами: `__enter__()` и `__exit__()`</a>. Их также можно использовать внутри зависимостей **FastAPI** с `yield`, применяя операторы `with` или `async with` внутри функции зависимости:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 19.7K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
/// In Python können Sie Kontextmanager erstellen, indem Sie <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">eine Klasse mit zwei Methoden erzeugen: `__enter__()` und `__exit__()`</a>. Sie können solche auch innerhalb von **FastAPI**-Abhängigkeiten mit `yield` verwenden, indem Sie `with`- oder `async with`-Anweisungen innerhalb der Abhängigkeits-Funktion verwenden:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md
/// Em Python, você pode criar Gerenciadores de Contexto ao <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">criar uma classe com dois métodos: `__enter__()` e `__exit__()`</a>. Você também pode usá-los dentro de dependências com `yield` do **FastAPI** ao utilizar `with` ou `async with` dentro da função da dependência:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.2K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
/// In Python, you can create Context Managers by <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">creating a class with two methods: `__enter__()` and `__exit__()`</a>. You can also use them inside of **FastAPI** dependencies with `yield` by using `with` or `async with` statements inside of the dependency function:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.9K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI**를 처음 시작하는 경우 지금은 이 부분을 건너뛰어도 좋습니다. /// Python에서는 다음을 통해 컨텍스트 관리자를 생성할 수 있습니다. <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank"> 두 가지 메서드가 있는 클래스를 생성합니다: `__enter__()` and `__exit__()`</a>. **FastAPI**의 `yield`가 있는 의존성 내에서 `with` 또는 `async with`문을 사용하여 이들을 활용할 수 있습니다: {* ../../docs_src/dependencies/tutorial010.py hl[1:9,13] *} /// tip | 팁
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Feb 09 14:54:09 UTC 2025 - 14.2K bytes - Viewed (0)