- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 814 for async (0.15 sec)
-
docs/ja/docs/async.md
``` ### より発展的な技術詳細 `await` は `async def` で定義された関数内でのみ使用できることがわかったかと思います。 しかし同時に、`async def` で定義された関数は「awaitされる」必要があります。なので、`async def` を持つ関数は、`async def` で定義された関数内でのみ呼び出せます。 では、このニワトリと卵の問題について、最初の `async` 関数をどのように呼び出すのでしょうか? **FastAPI**を使用している場合、その「最初の」関数が*path operation 関数*であり、FastAPIが正しく実行する方法を知っているので、心配する必要はありません。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 27.8K bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
```Python hl_lines="7" {!../../../docs_src/async_tests/test_main.py!} ``` !!! tip Note that the test function is now `async def` instead of just `def` as before when using the `TestClient`. Then we can create an `AsyncClient` with the app, and send async requests to it, using `await`. ```Python hl_lines="9-10" {!../../../docs_src/async_tests/test_main.py!} ``` This is the equivalent to:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 12:07:15 GMT 2024 - 3.9K bytes - Viewed (0) -
docs/de/docs/advanced/async-tests.md
```Python hl_lines="7" {!../../../docs_src/async_tests/test_main.py!} ``` !!! tip "Tipp" Beachten Sie, dass die Testfunktion jetzt `async def` ist und nicht nur `def` wie zuvor, wenn Sie den `TestClient` verwenden. Dann können wir einen `AsyncClient` mit der App erstellen und mit `await` asynchrone Requests an ihn senden. ```Python hl_lines="9-10" {!../../../docs_src/async_tests/test_main.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:25:57 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
➖ 💪 ⚙️ 🔁 🔢 👆 💯 💪 ⚠, 🖼, 🕐❔ 👆 🔬 👆 💽 🔁. 🌈 👆 💚 💯 📨 📨 👆 FastAPI 🈸 & ⤴️ ✔ 👈 👆 👩💻 ⏪ ✍ ☑ 💽 💽, ⏪ ⚙️ 🔁 💽 🗃. ➡️ 👀 ❔ 👥 💪 ⚒ 👈 👷. ## pytest.mark.anyio 🚥 👥 💚 🤙 🔁 🔢 👆 💯, 👆 💯 🔢 ✔️ 🔁. AnyIO 🚚 👌 📁 👉, 👈 ✔ 👥 ✔ 👈 💯 🔢 🤙 🔁. ## 🇸🇲 🚥 👆 **FastAPI** 🈸 ⚙️ 😐 `def` 🔢 ↩️ `async def`, ⚫️ `async` 🈸 🔘.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3K bytes - Viewed (0) -
docs/zh/docs/advanced/async-sql-databases.md
* 创建事件处理器,执行数据库连接与断开操作 ```Python hl_lines="42 45-47 50-52" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` ## 读取笔记 创建读取笔记的*路径操作函数*: ```Python hl_lines="55-58" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` !!! Note "笔记" 注意,本例与数据库通信时使用 `await`,因此*路径操作函数*要声明为异步函数(`asnyc`)。 ### 注意 `response_model=List[Note]` `response_model=List[Note]` 使用的是 `typing.List`。
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:44:40 GMT 2024 - 4.3K bytes - Viewed (0) -
docs/em/docs/advanced/async-sql-databases.md
* ✍ 🎉 🐕🦺 🔗 & 🔌 ⚪️➡️ 💽. ```Python hl_lines="42 45-47 50-52" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` ## ✍ 🗒 ✍ *➡ 🛠️ 🔢* ✍ 🗒: ```Python hl_lines="55-58" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` !!! Note 👀 👈 👥 🔗 ⏮️ 💽 ⚙️ `await`, *➡ 🛠️ 🔢* 📣 ⏮️ `async`. ### 👀 `response_model=List[Note]` ⚫️ ⚙️ `typing.List`.
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4K bytes - Viewed (0) -
docs/en/docs/how-to/async-sql-encode-databases.md
```Python hl_lines="42 45-47 50-52" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` ## Read notes Create the *path operation function* to read notes: ```Python hl_lines="55-58" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` !!! note Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`. ### Notice the `response_model=List[Note]`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.3K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
assert state["/sync_raise"] == "generator raise finalized" assert "/sync_raise" not in errors def test_sync_async_raise_raises(): with pytest.raises(AsyncDependencyError): client.get("/sync_async_raise") assert state["/async_raise"] == "asyncgen raise finalized" assert "/async_raise" in errors errors.clear() def test_sync_async_raise_server_error():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 11.6K bytes - Viewed (0) -
tests/test_ws_router.py
async def routerindexparams(websocket: WebSocket, pathparam: str, queryparam: str): await websocket.accept() await websocket.send_text(pathparam) await websocket.send_text(queryparam) await websocket.close() async def ws_dependency(): return "Socket Dependency" @router.websocket("/router-ws-depends/") async def router_ws_decorator_depends( websocket: WebSocket, data=Depends(ws_dependency)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_py310.py
from fastapi.testclient import TestClient app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: dict = Depends(common_parameters)):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.4K bytes - Viewed (0)