Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 165 for cdef (0.31 sec)

  1. docs/fr/docs/index.md

    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    <summary>Ou utilisez <code>async def</code> ...</summary>
    
    Si votre code utilise `async` / `await`, utilisez `async def` :
    
    ```Python hl_lines="9  14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 22K bytes
    - Viewed (0)
  2. README.md

    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    <summary>Or use <code>async def</code>...</summary>
    
    If your code uses `async` / `await`, use `async def`:
    
    ```Python hl_lines="9  14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  3. docs/em/docs/index.md

    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    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
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  4. docs/fr/docs/tutorial/first-steps.md

    Elle sera appelée par **FastAPI** quand une requête sur l'URL `/` sera reçue via une opération `GET`.
    
    Ici, c'est une fonction asynchrone (définie avec `async def`).
    
    ---
    
    Vous pourriez aussi la définir comme une fonction classique plutôt qu'avec `async def` :
    
    ```Python hl_lines="7"
    {!../../../docs_src/first_steps/tutorial003.py!}
    ```
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 20:52:31 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

     *
     * The `java.net.URI` class is strict around what URLs it accepts. It rejects URLs like
     * `http://example.com/abc|def` because the `|` character is unsupported. This class is more
     * forgiving: it will automatically percent-encode the `|'` yielding `http://example.com/abc%7Cdef`.
     * This kind behavior is consistent with web browsers. `HttpUrl` prefers consistency with major web
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  6. docs/ru/docs/tutorial/testing.md

    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "Подсказка"
        Обратите внимание, что тестирующая функция является обычной `def`, а не асинхронной `async def`.
    
        И вызов клиента также осуществляется без `await`.
    
        Это позволяет вам использовать `pytest` без лишних усложнений.
    
    !!! note "Технические детали"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

          override fun writeTo(sink: BufferedSink) {
            try {
              sink.writeUtf8("abc")
              sink.flush()
              Thread.sleep(sleepMillis.toLong())
              sink.writeUtf8("def")
            } catch (e: InterruptedException) {
              throw InterruptedIOException()
            }
          }
        }
      }
    
      companion object {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/dependencies/sub-dependencies.md

    高度なシナリオでは、「キャッシュされた」値を使うのではなく、同じリクエストの各ステップ(おそらく複数回)で依存関係を呼び出す必要があることがわかっている場合、`Depens`を使用する際に、`use_cache=False`というパラメータを設定することができます。
    
    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
        return {"fresh_value": fresh_value}
    ```
    
    ## まとめ
    
    ここで使われている派手な言葉は別にして、**依存性注入** システムは非常にシンプルです。
    
    *path operation関数*と同じように見えるただの関数です。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:43:41 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        clientListener.assertOpen()
        val server = serverListener.assertOpen()
        webSocket.send("abc")
        serverListener.assertTextMessage("abc")
        server.send("def")
        clientListener.assertTextMessage("def")
        closeWebSockets(webSocket, server)
      }
    
      @Test
      @Throws(IOException::class)
      fun missingConnectionHeader() {
        webServer.enqueue(
          MockResponse.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  10. docs/pl/docs/features.md

    Wystarczy, że napiszesz standardowe deklaracje typów Pythona:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Zadeklaruj parametr jako str
    # i uzyskaj wsparcie edytora wewnątrz funkcji
    def main(user_id: str):
        return user_id
    
    
    # Model Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    A one będą mogły zostać później użyte w następujący sposób:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.9K bytes
    - Viewed (0)
Back to top