Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,148 for async (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tests/test_dependency_class.py

    @app.get("/callable-dependency")
    async def get_callable_dependency(value: str = Depends(callable_dependency)):
        return value
    
    
    @app.get("/callable-gen-dependency")
    async def get_callable_gen_dependency(value: str = Depends(callable_gen_dependency)):
        return value
    
    
    @app.get("/async-callable-dependency")
    async def get_async_callable_dependency(
        value: str = Depends(async_callable_dependency),
    ):
        return value
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 10:54:05 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        async.setFuture(inner);
        async.cancel(false);
        assertTrue(inner.isCancelled());
        assertFalse(inner.wasInterrupted());
        assertThrows(CancellationException.class, () -> inner.get());
      }
    
      public void testCancel_beforeSet() throws Exception {
        SettableFuture<Object> async = SettableFuture.create();
        async.cancel(true);
        assertFalse(async.set(42));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
Back to top