Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for resync (0.16 sec)

  1. docs/ko/docs/index.md

    <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"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Union[str, None] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  2. docs/zh-hant/docs/index.md

    ```
    
    <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"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Union[str, None] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.8K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/dependencies/index.md

        只要把它传递给 `Depends`,**FastAPI** 就知道该如何执行后续操作。
    
    ## 要不要使用 `async`?
    
    **FastAPI** 调用依赖项的方式与*路径操作函数*一样,因此,定义依赖项函数,也要应用与路径操作函数相同的规则。
    
    即,既可以使用异步的 `async def`,也可以使用普通的 `def` 定义依赖项。
    
    在普通的 `def` *路径操作函数*中,可以声明异步的 `async def` 依赖项;也可以在异步的 `async def` *路径操作函数*中声明普通的 `def` 依赖项。
    
    上述这些操作都是可行的,**FastAPI** 知道该怎么处理。
    
    !!! note "笔记"
    
        如里不了解异步,请参阅[异步:*“着急了?”*](../../async.md){.internal-link target=_blank} 一章中 `async` 和 `await` 的内容。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 7K bytes
    - Viewed (0)
  4. docs/pl/docs/index.md

    <details markdown="1">
    <summary>Albo użyj <code>async def</code>...</summary>
    
    Jeżeli twój kod korzysta z `async` / `await`, użyj `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"}
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  5. docs/ru/docs/index.md

    <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"}
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  6. docs/it/docs/index.md

    <details markdown="1">
    <summary>Oppure usa <code>async def</code>...</summary>
    
    Se il tuo codice usa `async` / `await`, allora usa `async def`:
    
    ```Python hl_lines="7  12"
    from fastapi import FastAPI
    from typing import Optional
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Optional[str] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  7. docs/zh/docs/index.md

    ```
    
    <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"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: Union[str, None] = None):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/index.md

    ## To `async` or not to `async`
    
    As dependencies will also be called by **FastAPI** (the same as your *path operation functions*), the same rules apply while defining your functions.
    
    You can use `async def` or normal `def`.
    
    And you can declare dependencies with `async def` inside of normal `def` *path operation functions*, or `def` dependencies inside of `async def` *path operation functions*, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/dependencies/index.md

    ##  `async` ⚖️ 🚫 `async`
    
    🔗 🔜 🤙 **FastAPI** (🎏 👆 *➡ 🛠️ 🔢*), 🎏 🚫 ✔ ⏪ 🔬 👆 🔢.
    
    👆 💪 ⚙️ `async def` ⚖️ 😐 `def`.
    
    &amp; 👆 💪 📣 🔗 ⏮️ `async def` 🔘 😐 `def` *➡ 🛠️ 🔢*, ⚖️ `def` 🔗 🔘 `async def` *➡ 🛠️ 🔢*, ♒️.
    
    ⚫️ 🚫 🤔. **FastAPI** 🔜 💭 ⚫️❔.
    
    !!! note
        🚥 👆 🚫 💭, ✅ [🔁: *"🏃 ❓" *](../../async.md){.internal-link target=_blank} 📄 🔃 `async` &amp; `await` 🩺.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/dependencies/index.md

    ## `async`하게, 혹은 `async`하지 않게
    
    의존성이 (*경로 작동 함수*에서 처럼 똑같이) **FastAPI**에 의해 호출될 수 있으며, 함수를 정의할 때 동일한 규칙이 적용됩니다.
    
    `async def`을 사용하거나 혹은 일반적인 `def`를 사용할 수 있습니다.
    
    그리고 일반적인 `def` *경로 작동 함수* 안에 `async def`로 의존성을 선언할 수 있으며, `async def` *경로 작동 함수* 안에 `def`로 의존성을 선언하는 등의 방법이 있습니다.
    
    아무 문제 없습니다. **FastAPI**는 무엇을 할지 알고 있습니다.
    
    !!! note "참고"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
Back to top