- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 1,598 for yield (1.29 seconds)
-
fastapi/sse.py
"""Represents a single Server-Sent Event. When `yield`ed from a *path operation function* that uses `response_class=EventSourceResponse`, each `ServerSentEvent` is encoded into the [SSE wire format](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream) (`text/event-stream`). If you yield a plain object (dict, Pydantic model, etc.) instead, it isCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 6.2K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/helper/CrawlingConfigHelper.java
yield webConfigService.getWebConfig(id).get(); } case FILE -> { final FileConfigService fileConfigService = ComponentUtil.getComponent(FileConfigService.class); yield fileConfigService.getFileConfig(id).get(); } case DATA -> {
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Nov 28 16:29:12 GMT 2025 - 19.5K bytes - Click Count (1) -
tests/test_stream_cancellation.py
"""Async generator with no internal await - would hang without checkpoint.""" i = 0 while True: yield f"item {i}\n" i += 1 @app.get("/stream-jsonl") async def stream_jsonl() -> AsyncIterable[int]: """JSONL async generator with no internal await.""" i = 0 while True: yield i i += 1 async def _run_asgi_and_cancel(app: FastAPI, path: str, timeout: float) -> bool:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 2.7K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheCorruptionTest.kt
corruptor() return client.newCall(request).execute() } /** * @param delta the offset from the current date to use. Negative values yield dates in the past; * positive values yield dates in the future. */ private fun formatDate( delta: Long, timeUnit: TimeUnit, ): String? = formatDate(Date(System.currentTimeMillis() + timeUnit.toMillis(delta)))Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 6K bytes - Click Count (0) -
docs_src/dependencies/tutorial008e_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() def get_username(): try: yield "Rick" finally: print("Cleanup up before response is sent") @app.get("/users/me") def get_user_me(username: Annotated[str, Depends(get_username, scope="function")]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 329 bytes - Click Count (0) -
docs/ja/docs/tutorial/server-sent-events.md
/// ## FastAPI で SSE をストリーミング { #stream-sse-with-fastapi } FastAPI で SSE をストリーミングするには、*path operation 関数*で `yield` を使い、`response_class=EventSourceResponse` を設定します。 `EventSourceResponse` は `fastapi.sse` からインポートします: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} yield された各アイテムは JSON にエンコードされ、SSE イベントの `data:` フィールドで送信されます。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:55:22 GMT 2026 - 5.8K bytes - Click Count (0) -
scripts/translate.py
Path("docs/en/docs/advanced"), Path("docs/en/docs/about"), Path("docs/en/docs/how-to"), ] first_parent = Path("docs/en/docs") 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 Path("docs/en/docs").rglob("*.md"): if str(path).startswith(first_dirs_str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:37:41 GMT 2026 - 15.8K bytes - Click Count (0) -
docs/ko/docs/tutorial/stream-json-lines.md
비디오나 오디오처럼 바이너리 데이터를 스트리밍하려면 고급 가이드를 확인하세요: [스트림 데이터](../advanced/stream-data.md). /// ## FastAPI로 JSON Lines 스트리밍 { #stream-json-lines-with-fastapi } FastAPI에서 JSON Lines를 스트리밍하려면, *경로 처리 함수*에서 `return`을 사용하는 대신 `yield`로 각 항목을 차례로 생성하면 됩니다. {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[1:24] hl[24] *} 보내려는 각 JSON 항목의 타입이 `Item`(Pydantic 모델)이고 함수가 async라면, 반환 타입을 `AsyncIterable[Item]`로 선언할 수 있습니다:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:56:39 GMT 2026 - 4.8K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/HashFunction.java
* always returns zero could be called a hash function. It is not.) * </ul> * * <p>Summarizing the last two points: "equal yield equal <i>always</i>; unequal yield unequal * <i>often</i>." This is the most important characteristic of all hash functions. * * <h3>Desirable properties</h3> *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 10.9K bytes - Click Count (0) -
docs_src/dependencies/tutorial010_py310.py
def __enter__(self): return self.db def __exit__(self, exc_type, exc_value, traceback): self.db.close() async def get_db(): with MySuperContextManager() as db:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 292 bytes - Click Count (0)