Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 18 of 18 for contextmanager (0.12 seconds)

  1. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    Убедитесь, что используете `yield` только один раз на одну зависимость.
    
    ///
    
    /// note | Технические детали
    
    Любая функция, с которой можно корректно использовать:
    
    * [`@contextlib.contextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager) или
    * [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager)
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 19.4K bytes
    - Click Count (0)
  2. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    Garanta utilizar `yield` apenas uma vez por dependência.
    
    ///
    
    /// note | Detalhes Técnicos
    
    Qualquer função que possa ser utilizada com:
    
    * [`@contextlib.contextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager) ou
    * [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager)
    
    pode ser utilizada como uma dependência do **FastAPI**.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  3. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    为此,使用 `yield` 而不是 `return`,并把这些额外步骤(代码)写在后面。
    
    /// tip | 提示
    
    确保在每个依赖里只使用一次 `yield`。
    
    ///
    
    /// note | 技术细节
    
    任何可以与以下装饰器一起使用的函数:
    
    * [`@contextlib.contextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager) 或
    * [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager)
    
    都可以作为 **FastAPI** 的依赖项。
    
    实际上,FastAPI 在内部就是用的这两个装饰器。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 12.1K bytes
    - Click Count (0)
  4. docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md

    /// tip
    
    각 의존성마다 `yield`는 한 번만 사용해야 합니다.
    
    ///
    
    /// note | 기술 세부사항
    
    다음과 함께 사용할 수 있는 모든 함수:
    
    * [`@contextlib.contextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager) 또는
    * [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager)
    
    는 **FastAPI**의 의존성으로 사용할 수 있습니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  5. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    これを行うには、`return`の代わりに`yield`を使い、その後に追加のステップ(コード)を書きます。
    
    /// tip | 豆知識
    
    `yield`は必ず依存関係ごとに1回だけ使用するようにしてください。
    
    ///
    
    /// note | 技術詳細
    
    以下と一緒に使用できる関数なら何でも有効です:
    
    * [`@contextlib.contextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager) または
    * [`@contextlib.asynccontextmanager`](https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager)
    
    これらは **FastAPI** の依存関係として使用するのに有効です。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 15.4K bytes
    - Click Count (0)
  6. docs/de/docs/_llm-test.md

    * das Software Development Kit
    
    * der `APIRouter`
    * die `requirements.txt`
    * das Bearer-Token
    * der Breaking Change
    * der Bug
    * der Button
    * das Callable
    * der Code
    * der Commit
    * der Contextmanager
    * die Coroutine
    * die Datenbanksession
    * die Festplatte
    * die Domain
    * die Engine
    * das Fake-X
    * die HTTP-GET-Methode
    * das Item
    * die Bibliothek
    * der Lifespan
    * der Lock
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  7. docs/de/docs/advanced/events.md

    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    In neueren Versionen von Python gibt es auch einen **asynchronen Kontextmanager**. Sie würden ihn mit `async with` verwenden:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  8. fastapi/routing.py

        """
        Wrap a generator-based lifespan context into an async context manager.
    
        This is vendored from Starlette to avoid importing private symbols.
        """
        cmgr = contextlib.contextmanager(lifespan_context)
    
        @functools.wraps(cmgr)
        def wrapper(app: Any) -> _AsyncLiftContextManager[Any]:
            return _AsyncLiftContextManager(cmgr(app))
    
        return wrapper
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
Back to Top