Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 46 for Suplee (0.16 sec)

  1. docs/ru/docs/tutorial/body-nested-models.md

    {!> ../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### Объявление `list` с указанием типов для вложенных элементов
    
    Объявление типов для элементов (внутренних типов) вложенных в такие типы как `list`, `dict`, `tuple`:
    
    * Если у вас Python версии ниже чем 3.9, импортируйте их аналог из модуля `typing`
    * Передайте внутренний(ие) тип(ы) как "параметры типа", используя квадратные скобки: `[` и `]`
    
    В Python версии 3.9 это будет выглядеть так:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/response-model.md

        Äquivalent zu `set(["name", "description"])`.
    
    #### `list`en statt `set`s verwenden
    
    Wenn Sie vergessen, ein `set` zu verwenden, und stattdessen eine `list`e oder ein `tuple` übergeben, wird FastAPI die dennoch in ein `set` konvertieren, und es wird korrekt funktionieren:
    
    === "Python 3.10+"
    
        ```Python hl_lines="29  35"
        {!> ../../../docs_src/response_model/tutorial006_py310.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/response-model.md

        ```
    
    !!! tip
        ❕ `{"name", "description"}` ✍ `set` ⏮️ 📚 2️⃣ 💲.
    
        ⚫️ 🌓 `set(["name", "description"])`.
    
    #### ⚙️ `list`Ⓜ ↩️ `set`Ⓜ
    
    🚥 👆 💭 ⚙️ `set` & ⚙️ `list` ⚖️ `tuple` ↩️, FastAPI 🔜 🗜 ⚫️ `set` & ⚫️ 🔜 👷 ☑:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="31  37"
        {!> ../../../docs_src/response_model/tutorial006.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    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)
  4. docs/en/docs/release-notes.md

    * 📝 Tweak and improve docs for Request Files. PR [#4470](https://github.com/tiangolo/fastapi/pull/4470) by [@tiangolo](https://github.com/tiangolo).
    
    ### Fixes
    
    * 🐛 Fix bug preventing to use OpenAPI when using tuples. PR [#3874](https://github.com/tiangolo/fastapi/pull/3874) by [@victorbenichoux](https://github.com/victorbenichoux).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  5. tests/test_invalid_path_param.py

    from typing import Dict, List, Tuple
    
    import pytest
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: List[Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  6. tests/test_invalid_sequence_param.py

    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  7. tests/test_dependency_security_overrides.py

    from typing import List, Tuple
    
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def get_user(required_scopes: SecurityScopes):
        return "john", required_scopes.scopes
    
    
    def get_user_override(required_scopes: SecurityScopes):
        return "alice", required_scopes.scopes
    
    
    def get_data():
        return [1, 2, 3]
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jun 14 15:54:46 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  8. docs/em/docs/python-types.md

    #### 🔢 & ⚒
    
    👆 🔜 🎏 📣 `tuple`Ⓜ & `set`Ⓜ:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="1  4"
        {!> ../../../docs_src/python_types/tutorial007.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ & 🔛"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/python_types/tutorial007_py39.py!}
        ```
    
    👉 ⛓:
    
    * 🔢 `items_t` `tuple` ⏮️ 3️⃣ 🏬, `int`, ➕1️⃣ `int`, & `str`.
    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)
  9. docs/ko/docs/tutorial/body-nested-models.md

    ### typing의 `List` 임포트
    
    먼저, 파이썬 표준 `typing` 모듈에서 `List`를 임포트합니다:
    
    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### 타입 매개변수로 `List` 선언
    
    `list`, `dict`, `tuple`과 같은 타입 매개변수(내부 타입)를 갖는 타입을 선언하려면:
    
    * `typing` 모듈에서 임포트
    * 대괄호를 사용하여 "타입 매개변수"로 내부 타입 전달: `[` 및 `]`
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    이 모든 것은 타입 선언을 위한 표준 파이썬 문법입니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/body-nested-models.md

    ```Python hl_lines="1"
    {!> ../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### Declare a `list` with a type parameter
    
    To declare types that have type parameters (internal types), like `list`, `dict`, `tuple`:
    
    * If you are in a Python version lower than 3.9, import their equivalent version from the `typing` module
    * Pass the internal type(s) as "type parameters" using square brackets: `[` and `]`
    
    In Python 3.9 it would be:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
Back to top