Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 68 for union (0.42 sec)

  1. docs/vi/docs/index.md

    ## Ví dụ
    
    ### Khởi tạo
    
    * Tạo một tệp tin `main.py` như sau:
    
    ```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}
    ```
    
    <details markdown="1">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/body-multiple-params.md

    }
    ```
    
    🔄, ⚫️ 🔜 🗜 📊 🆎, ✔, 📄, ♒️.
    
    ## 💗 💪 = &amp; 🔢
    
    ↗️, 👆 💪 📣 🌖 🔢 🔢 🕐❔ 👆 💪, 🌖 🙆 💪 🔢.
    
    , 🔢, ⭐ 💲 🔬 🔢 🔢, 👆 🚫 ✔️ 🎯 🚮 `Query`, 👆 💪:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    ⚖️ 🐍 3️⃣.1️⃣0️⃣ &amp; 🔛:
    
    ```Python
    q: str | None = None
    ```
    
    🖼:
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="27"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 5K bytes
    - Viewed (0)
  3. docs/fr/docs/index.md

    ## Exemple
    
    ### Créez
    
    * Créez un fichier `main.py` avec :
    
    ```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}
    ```
    
    <details markdown="1">
    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)
  4. docs/yo/docs/index.md

    ### Ṣẹ̀dá rẹ̀
    
    * Ṣẹ̀dá fáìlì `main.py (èyí tíí ṣe, akọkọ.py)` pẹ̀lú:
    
    ```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}
    ```
    
    <details markdown="1">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 24.1K bytes
    - Viewed (0)
  5. README.md

    ## Example
    
    ### Create it
    
    * Create a file `main.py` with:
    
    ```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}
    ```
    
    <details markdown="1">
    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)
  6. docs/em/docs/index.md

    </div>
    
    ## 🖼
    
    ### ✍ ⚫️
    
    * ✍ 📁 `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}
    ```
    
    <details markdown="1">
    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)
  7. docs/en/docs/tutorial/body-multiple-params.md

    As, by default, singular values are interpreted as query parameters, you don't have to explicitly add a `Query`, you can just do:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    Or in Python 3.10 and above:
    
    ```Python
    q: str | None = None
    ```
    
    For example:
    
    === "Python 3.10+"
    
        ```Python hl_lines="27"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/extra-models.md

    !!! note "Hinweis"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/response-model.md

    ### ❌ 📨 🆎 ✍
    
    ✋️ 🕐❔ 👆 📨 🎏 ❌ 🎚 👈 🚫 ☑ Pydantic 🆎 (✅ 💽 🎚) &amp; 👆 ✍ ⚫️ 💖 👈 🔢, FastAPI 🔜 🔄 ✍ Pydantic 📨 🏷 ⚪️➡️ 👈 🆎 ✍, &amp; 🔜 ❌.
    
    🎏 🔜 🔨 🚥 👆 ✔️ 🕳 💖 <abbr title='A union between multiple types means "any of these types".'>🇪🇺</abbr> 🖖 🎏 🆎 🌐❔ 1️⃣ ⚖️ 🌅 👫 🚫 ☑ Pydantic 🆎, 🖼 👉 🔜 ❌ 👶:
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="10"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 16K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/extra-models.md

        ```
    
    ## `Union` 或者 `anyOf`
    
    响应可以声明为两种类型的 `Union` 类型,即该响应可以是两种类型中的任意类型。
    
    在 OpenAPI 中可以使用 `anyOf` 定义。
    
    为此,请使用 Python 标准类型提示 <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note "笔记"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 01:15:53 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top