- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 296 for yielded (0.09 seconds)
-
docs/ko/docs/advanced/events.md
새 버전을 시작해야 할 수도 있고, 그냥 실행하는 게 지겨워졌을 수도 있습니다. 🤷 /// ### Lifespan 함수 { #lifespan-function } 먼저 주목할 점은 `yield`를 사용하여 비동기 함수를 정의하고 있다는 것입니다. 이는 `yield`를 사용하는 의존성과 매우 유사합니다. {* ../../docs_src/events/tutorial003_py310.py hl[14:19] *} 함수의 첫 번째 부분, 즉 `yield` 이전의 코드는 애플리케이션이 시작되기 **전에** 실행됩니다. 그리고 `yield` 이후의 부분은 애플리케이션이 종료된 **후에** 실행됩니다. ### 비동기 컨텍스트 매니저 { #async-context-manager }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 9.1K bytes - Click Count (0) -
scripts/translation_fixer.py
] first_parent = lang_path_root yield from first_parent.glob("*.md") for dir_path in first_dirs: yield from dir_path.rglob("*.md") first_dirs_str = tuple(str(d) for d in first_dirs) for path in lang_path_root.rglob("*.md"): if str(path).startswith(first_dirs_str): continue if path.parent == first_parent: continue yield path def get_all_paths(lang: str):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 10 21:48:08 GMT 2026 - 3.2K bytes - Click Count (0) -
docs_src/server_sent_events/tutorial005_py310.py
@app.post("/chat/stream", response_class=EventSourceResponse) async def stream_chat(prompt: Prompt) -> AsyncIterable[ServerSentEvent]: words = prompt.text.split() for word in words: yield ServerSentEvent(data=word, event="token")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 528 bytes - Click Count (0) -
docs/uk/docs/tutorial/server-sent-events.md
Щоб транслювати SSE з FastAPI, використовуйте `yield` у вашій *функції операції шляху* і встановіть `response_class=EventSourceResponse`. Імпортуйте `EventSourceResponse` з `fastapi.sse`: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Кожен елемент, повернений через `yield`, кодується як JSON і надсилається в полі `data:` події SSE.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:25:54 GMT 2026 - 7.1K bytes - Click Count (0) -
docs_src/server_sent_events/tutorial002_py310.py
] @app.get("/items/stream", response_class=EventSourceResponse) async def stream_items() -> AsyncIterable[ServerSentEvent]: yield ServerSentEvent(comment="stream of item updates") for i, item in enumerate(items):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 686 bytes - Click Count (0) -
docs/tr/docs/tutorial/server-sent-events.md
FastAPI ile SSE akışı yapmak için, *path operation function* içinde `yield` kullanın ve `response_class=EventSourceResponse` olarak ayarlayın. `EventSourceResponse`'u `fastapi.sse` içinden içe aktarın: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Yield edilen her öğe JSON olarak kodlanır ve bir SSE olayının `data:` alanında gönderilir.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:51:35 GMT 2026 - 5.1K bytes - Click Count (0) -
docs/ru/docs/tutorial/server-sent-events.md
## Стриминг SSE с FastAPI { #stream-sse-with-fastapi } Чтобы стримить SSE с FastAPI, используйте `yield` в своей функции-обработчике пути и укажите `response_class=EventSourceResponse`. Импортируйте `EventSourceResponse` из `fastapi.sse`: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Каждый возвращаемый через `yield` элемент кодируется как JSON и отправляется в поле `data:` события SSE.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.4K bytes - Click Count (0) -
docs/es/docs/tutorial/server-sent-events.md
## Streaming de SSE con FastAPI { #stream-sse-with-fastapi } Para hacer streaming de SSE con FastAPI, usa `yield` en tu path operation function y establece `response_class=EventSourceResponse`. import `EventSourceResponse` de `fastapi.sse`: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} Cada ítem producido con `yield` se codifica como JSON y se envía en el campo `data:` de un evento SSE.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:12:26 GMT 2026 - 5K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/conftest.py
with runner.isolated_filesystem(): yield runner @pytest.fixture(name="root_dir") def prepare_paths(runner): docs_dir = Path("docs") en_docs_dir = docs_dir / "en" / "docs" lang_docs_dir = docs_dir / "lang" / "docs" en_docs_dir.mkdir(parents=True, exist_ok=True) lang_docs_dir.mkdir(parents=True, exist_ok=True) yield Path.cwd() @pytest.fixture
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 25 10:37:59 GMT 2026 - 1.3K bytes - Click Count (0) -
tests/test_dependency_yield_scope_websockets.py
class Session: def __init__(self) -> None: self.open = True async def dep_session() -> Any: s = Session() yield s s.open = False global_state = global_context.get() global_state["session_closed"] = True SessionFuncDep = Annotated[Session, Depends(dep_session, scope="function")]Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6K bytes - Click Count (0)