Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for contextmanager (0.16 sec)

  1. tests/test_dependency_after_yield_streaming.py

    from collections.abc import Generator
    from contextlib import contextmanager
    from typing import Annotated, Any
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.responses import StreamingResponse
    from fastapi.testclient import TestClient
    
    
    class Session:
        def __init__(self) -> None:
            self.data = ["foo", "bar", "baz"]
            self.open = True
    
        def __iter__(self) -> Generator[str, None, None]:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  2. tests/test_dependency_after_yield_websockets.py

    from collections.abc import Generator
    from contextlib import contextmanager
    from typing import Annotated, Any
    
    import pytest
    from fastapi import Depends, FastAPI, WebSocket
    from fastapi.testclient import TestClient
    
    
    class Session:
        def __init__(self) -> None:
            self.data = ["foo", "bar", "baz"]
            self.open = True
    
        def __iter__(self) -> Generator[str, None, None]:
            for item in self.data:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    {* ../../docs_src/dependencies/tutorial010_py39.py hl[1:9,13] *}
    
    /// tip | Tipp
    
    Andere Möglichkeiten, einen Kontextmanager zu erstellen, sind:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> oder
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.7K bytes
    - Viewed (0)
  4. docs/es/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    /// note | Detalles técnicos
    
    Cualquier función que sea válida para usar con:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> o
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    /// note | Технические детали
    
    Любая функция, с которой можно корректно использовать:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> или
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    /// note | Detalhes Técnicos
    
    Qualquer função que possa ser utilizada com:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> ou
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    /// note | Technical Details
    
    Any function that is valid to use with:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> or
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md

    /// tip | 팁
    
    각 의존성마다 `yield`는 한 번만 사용해야 합니다.
    
    ///
    
    /// note | 기술 세부사항
    
    다음과 함께 사용할 수 있는 모든 함수:
    
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> 또는
    * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Feb 09 14:54:09 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  9. 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
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 07:17:04 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

    import dataclasses
    import inspect
    import sys
    from collections.abc import Coroutine, Mapping, Sequence
    from contextlib import AsyncExitStack, contextmanager
    from copy import copy, deepcopy
    from dataclasses import dataclass
    from typing import (
        Annotated,
        Any,
        Callable,
        ForwardRef,
        Optional,
        Union,
        cast,
    )
    
    import anyio
    from fastapi import params
    from fastapi._compat import (
        ModelField,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
Back to top