- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 539 for yield (0.04 sec)
-
docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
/// ## ๐ โฎ๏ธ `yield` & `HTTPException` ๐ ๐ ๐ ๐ ๐ช โ๏ธ ๐ โฎ๏ธ `yield` & โ๏ธ `try` ๐ซ ๐ โ โ . โซ๏ธ 5๏ธโฃ๐ ๐ ๐ค `HTTPException` โ๏ธ ๐ ๐ช ๐, โฎ๏ธ `yield`. โ๏ธ **โซ๏ธ ๐ ๐ซ ๐ท**. ๐ช ๐ ๐ โฎ๏ธ `yield` ๐ ๏ธ *โฎ๏ธ* ๐จ ๐จ, [โ ๐โ๐ฆบ](../handling-errors.md#_4){.internal-link target=_blank} ๐ โ๏ธ โช ๐. ๐ค ๐ณ ๐ฝ โ ๐ฎ ๐ ๐ ๐ช ๐ (โฎ๏ธ `yield`).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
src/bytes/iter.go
return explodeSeq(s) } return func(yield func([]byte) bool) { for { i := Index(s, sep) if i < 0 { break } frag := s[:i+sepSave] if !yield(frag[:len(frag):len(frag)]) { return } s = s[i+len(sep):] } yield(s[:len(s):len(s)]) } } // SplitSeq returns an iterator over all substrings of s separated by sep.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0) -
docs/em/docs/advanced/events.md
`shutdown` ๐ ๐จ ๐โ ๐ **โ๏ธ** ๐ธ. ๐ฒ ๐ ๐ช โถ๏ธ ๐ โฌ, โ๏ธ ๐ ๐ค ๐ก ๐ โซ๏ธ. ๐คท /// ### ๐ ๐ข ๐ฅ ๐ ๐, ๐ ๐ฅ โ ๐ ๐ข โฎ๏ธ `yield`. ๐ ๐ถ ๐ ๐ โฎ๏ธ `yield`. ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` ๐ฅ ๐ ๐ข, โญ `yield`, ๐ ๐ ๏ธ **โญ** ๐ธ โถ๏ธ. & ๐ โฎ๏ธ `yield` ๐ ๐ ๏ธ **โฎ๏ธ** ๐ธ โ๏ธ ๐. ### ๐ ๐ ๐จโ๐ผ ๐ฅ ๐ โ , ๐ข ๐ โฎ๏ธ `@asynccontextmanager`. ๐ ๐ ๐ข ๐ ๐ณ ๐ค "**๐ ๐ ๐จโ๐ผ**".
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial008_an_py39.py
from fastapi import Depends async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 521 bytes - Viewed (0) -
tests/test_dependency_contextvars.py
client = TestClient(app) def test_dependency_contextvars(): """ Check that custom middlewares don't affect the contextvar context for dependencies. The code before yield and the code after yield should be run in the same contextvar context, so that request_state_context_var.reset(contextvar_token). If they are run in a different context, that raises an error. """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Feb 17 12:40:12 UTC 2022 - 1.5K bytes - Viewed (0) -
tests/test_router_events.py
async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: yield @asynccontextmanager async def router_lifespan(app: FastAPI) -> AsyncGenerator[Dict[str, bool], None]: yield {"router": True} @asynccontextmanager async def sub_router_lifespan(app: FastAPI) -> AsyncGenerator[None, None]: yield sub_router = APIRouter(lifespan=sub_router_lifespan)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
docs_src/dependencies/tutorial008.py
dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 455 bytes - Viewed (0) -
docs_src/dependencies/tutorial009.py
dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a=Depends(dependency_a)): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b=Depends(dependency_b)): dep_c = generate_dep_c() try: yield dep_c finally:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 455 bytes - Viewed (0) -
docs_src/dependencies/tutorial008_an.py
from typing_extensions import Annotated async def dependency_a(): dep_a = generate_dep_a() try: yield dep_a finally: dep_a.close() async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]): dep_b = generate_dep_b() try: yield dep_b finally: dep_b.close(dep_a) async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 531 bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
A primeira coisa a notar, รฉ que estamos definindo uma funรงรฃo assรญncrona com `yield`. Isso รฉ muito semelhante ร Dependรชncias com `yield`. ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` A primeira parte da funรงรฃo, antes do `yield`, serรก executada **antes** da aplicaรงรฃo inicializar. E a parte posterior do `yield` irรก executar **apรณs** a aplicaรงรฃo ser encerrada. ### Gerenciador de Contexto Assรญncrono
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0)