Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 157 for cdef (0.13 sec)

  1. docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md

    в таком случае он является "вызываемым".
    
    ## Классы как зависимости
    
    Вы можете заметить, что для создания экземпляра класса в Python используется тот же синтаксис.
    
    Например:
    
    ```Python
    class Cat:
        def __init__(self, name: str):
            self.name = name
    
    
    fluffy = Cat(name="Mr Fluffy")
    ```
    
    В данном случае `fluffy` является экземпляром класса `Cat`.
    
    А чтобы создать `fluffy`, вы "вызываете" `Cat`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 12 11:12:19 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  2. docs/ru/docs/deployment/docker.md

    * Создайте файл `main.py` и заполните его:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    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}
    ```
    
    ### Dockerfile
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 57.5K bytes
    - Viewed (0)
  3. docs/en/docs/alternatives.md

    ```Python
    response = requests.get("http://example.com/some/url")
    ```
    
    The FastAPI counterpart API *path operation* could look like:
    
    ```Python hl_lines="1"
    @app.get("/some/url")
    def read_url():
        return {"message": "Hello World"}
    ```
    
    See the similarities in `requests.get(...)` and `@app.get(...)`.
    
    !!! check "Inspired **FastAPI** to"
        * Have a simple and intuitive API.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. docs/em/docs/alternatives.md

    🌌 👆 ⚙️ ⚫️ 📶 🙅. 🖼, `GET` 📨, 👆 🔜 ✍:
    
    ```Python
    response = requests.get("http://example.com/some/url")
    ```
    
    FastAPI 😑 🛠️ *➡ 🛠️* 💪 👀 💖:
    
    ```Python hl_lines="1"
    @app.get("/some/url")
    def read_url():
        return {"message": "Hello World"}
    ```
    
    👀 🔀 `requests.get(...)` & `@app.get(...)`.
    
    !!! check "😮 **FastAPI** "
        * ✔️ 🙅 & 🏋️ 🛠️.
        * ⚙️ 🇺🇸🔍 👩‍🔬 📛 (🛠️) 🔗, 🎯 & 🏋️ 🌌.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  5. docs/pt/docs/async.md

    ### Sub-dependências
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  6. docs/fr/docs/async.md

    ```Python hl_lines="2"
    @app.get('/')
    def results():
        results = some_library()
        return results
    ```
    
    ---
    
    Si votre application n'a pas à communiquer avec une bibliothèque externe et pas à attendre de réponse, utilisez `async def`.
    
    ---
    
    Si vous ne savez pas, utilisez seulement `def` comme vous le feriez habituellement.
    
    ---
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 24K bytes
    - Viewed (0)
  7. docs/ja/docs/async.md

    それでも、どちらの状況でも、**FastAPI**が過去のフレームワークよりも (またはそれに匹敵するほど) [高速になる](index.md#_10){.internal-link target=_blank}可能性があります。
    
    ### 依存関係
    
    依存関係についても同様です。依存関係が `async def` ではなく標準の `def` 関数である場合、外部スレッドプールで実行されます。
    
    ### サブ依存関係
    
    (関数定義のパラメーターとして) 相互に必要な複数の依存関係とサブ依存関係を設定できます。一部は `async def` で作成され、他の一部は通常の `def` で作成されます。それでも動作し、通常の `def`で作成されたものは、「awaitされる」代わりに (スレッドプールから) 外部スレッドで呼び出されます。
    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)
  8. docs/de/docs/advanced/async-tests.md

    ## HTTPX
    
    Auch wenn Ihre **FastAPI**-Anwendung normale `def`-Funktionen anstelle von `async def` verwendet, handelt es sich darunter immer noch um eine `async`hrone Anwendung.
    
    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)
  9. docs/em/docs/advanced/async-tests.md

    ➡️ 👀 ❔ 👥 💪 ⚒ 👈 👷.
    
    ## pytest.mark.anyio
    
    🚥 👥 💚 🤙 🔁 🔢 👆 💯, 👆 💯 🔢 ✔️ 🔁. AnyIO 🚚 👌 📁 👉, 👈 ✔ 👥 ✔ 👈 💯 🔢 🤙 🔁.
    
    ## 🇸🇲
    
    🚥 👆 **FastAPI** 🈸 ⚙️ 😐 `def` 🔢 ↩️ `async def`, ⚫️ `async` 🈸 🔘.
    
    `TestClient` 🔨 🎱 🔘 🤙 🔁 FastAPI 🈸 👆 😐 `def` 💯 🔢, ⚙️ 🐩 ✳. ✋️ 👈 🎱 🚫 👷 🚫🔜 🕐❔ 👥 ⚙️ ⚫️ 🔘 🔁 🔢. 🏃 👆 💯 🔁, 👥 💪 🙅‍♂ 📏 ⚙️ `TestClient` 🔘 👆 💯 🔢.
    
    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)
  10. docs/ru/docs/tutorial/dependencies/index.md

    Вы можете использовать `async def` или обычное `def`.
    
    Вы также можете объявить зависимости с `async def` внутри обычной `def` *функции обработки пути*, или `def` зависимости внутри `async def` *функции обработки пути*, и так далее.
    
    Это всё не важно. **FastAPI** знает, что нужно сделать. 😎
    
    !!! note "Информация"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.7K bytes
    - Viewed (0)
Back to top