- Sort Score
- Result 10 results
- Languages All
Results 171 - 180 of 243 for avait (0.03 sec)
-
tests/test_dependency_contextmanager.py
) tasks.add_task(bg, state) return state @app.middleware("http") async def middleware(request, call_next): response: StreamingResponse = await call_next(request) response.headers["x-state"] = json.dumps(state.copy()) return response client = TestClient(app) def test_async_state():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/fa/docs/index.md
async def read_item(item_id: int, q: Optional[str] = None): return {"item_id": item_id, "q": q} ``` **توجه**: اگر با `async / await` آشنا نیستید، به بخش _"عجله دارید?"_ در صفحه درباره <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` و `await` در مستندات</a> مراجعه کنید. </details> ### اجرا کنید با استفاده از دستور زیر سرور را اجرا کنید: <div class="termy">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 25.9K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
// Cause acceptConnections() to break out. serverSocket.close() // Await shutdown. for (queue in taskRunner.activeQueues()) { if (!queue.idleLatch().await(5, TimeUnit.SECONDS)) { throw IOException("Gave up waiting for queue to shut down") } } taskRunnerBackend.shutdown() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 37.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
assertEquals(cancelMode == INTERRUPT, Thread.interrupted()) } responseBody.close() assertEquals(if (connectionType == H2) 1 else 0, client.connectionPool.connectionCount()) cancelLatch.await() val events = listener.eventSequence.filter { isConnectionEvent(it) }.map { it.name } listener.clearAllEvents() assertThat(events).startsWith("CallStart", "ConnectStart", "ConnectEnd", "ConnectionAcquired")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/testing.md
{!../../docs_src/app_testing/tutorial001.py!} ``` /// tip | "Dica" Observe que as funções de teste são `def` normais, não `async def`. E as chamadas para o cliente também são chamadas normais, não usando `await`. Isso permite que você use `pytest` diretamente sem complicações. /// /// note | "Detalhes técnicos" Você também pode usar `from starlette.testclient import TestClient`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.9K bytes - Viewed (0) -
docs/vi/docs/index.md
return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Hoặc sử dụng <code>async def</code>...</summary> Nếu code của bạn sử dụng `async` / `await`, hãy sử dụng `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 21.9K bytes - Viewed (0) -
docs/zh/docs/index.md
def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>或者使用 <code>async def</code>...</summary> 如果你的代码里会出现 `async` / `await`,请使用 `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root(): return {"Hello": "World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 18.2K bytes - Viewed (0) -
docs/bn/docs/index.md
def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>অথবা ব্যবহার করুন <code>async def</code>...</summary> যদি আপনার কোড `async` / `await`, ব্যবহার করে তাহলে `async def` ব্যবহার করুন: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 30.2K bytes - Viewed (0) -
docs/hu/docs/index.md
def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Vagy használd az <code>async def</code>-et...</summary> Ha a kódod `async` / `await`-et, használ `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 20.2K bytes - Viewed (0) -
docs/pt/docs/index.md
def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Ou use <code>async def</code>...</summary> Se seu código utiliza `async` / `await`, use `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root(): return {"Hello": "World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 18.6K bytes - Viewed (0)