Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 133 for List (0.15 sec)

  1. tests/test_response_by_alias.py

                                },
                            }
                        },
                    }
                },
                "/list": {
                    "get": {
                        "summary": "Read List",
                        "operationId": "read_list_list_get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/body-nested-models.md

    ```Python
    my_list: list[str]
    ```
    
    Und in Python-Versionen vor 3.9:
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    Das ist alles Standard-Python-Syntax für Typdeklarationen.
    
    Verwenden Sie dieselbe Standardsyntax für Modellattribute mit inneren Typen.
    
    In unserem Beispiel können wir also bewirken, dass `tags` spezifisch eine „Liste von Strings“ ist:
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  3. docs/uk/docs/python-types.md

        У цьому випадку, `str` це параметр типу переданий у `List` (або `list` у Python 3.9 і вище).
    
    Це означає: "змінна `items` це `list`, і кожен з елементів у цьому списку - `str`".
    
    !!! tip
        Якщо ви використовуєте Python 3.9 і вище, вам не потрібно імпортувати `List` з `typing`, ви можете використовувати натомість тип `list`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  4. tests/test_query.py

    
    def test_query_list():
        response = client.get("/query/list/?device_ids=1&device_ids=2")
        assert response.status_code == 200
        assert response.json() == [1, 2]
    
    
    def test_query_list_empty():
        response = client.get("/query/list/")
        assert response.status_code == 422
    
    
    def test_query_list_default():
        response = client.get("/query/list-default/?device_ids=1&device_ids=2")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs/ru/docs/python-types.md

    Чтобы объявить эти типы и внутренние типы, вы можете использовать стандартный Python-модуль `typing`.
    
    Он существует специально для поддержки подсказок этих типов.
    
    #### `List`
    
    Например, давайте определим переменную как `list`, состоящий из `str`.
    
    Импортируйте `List` из `typing` (с заглавной `L`):
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/query-params-str-validations.md

        "foo",
        "bar"
      ]
    }
    ```
    
    #### Utiliser `list`
    
    Il est aussi possible d'utiliser directement `list` plutôt que `List[str]` :
    
    ```Python hl_lines="7"
    {!../../../docs_src/query_params_str_validations/tutorial013.py!}
    ```
    
    !!! note
        Dans ce cas-là, **FastAPI** ne vérifiera pas le contenu de la liste.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/query-params-str-validations.md

    ```
    http://localhost:8000/items/?q=foo&q=bar
    ```
    
    複数の*クエリパラメータ*の値`q`(`foo`と`bar`)を*path operation関数*内で*関数パラメータ*`q`としてPythonの`list`を受け取ることになります。
    
    そのため、このURLのレスポンスは以下のようになります:
    
    ```JSON
    {
      "q": [
        "foo",
        "bar"
      ]
    }
    ```
    
    !!! tip "豆知識"
        上述の例のように、`list`型のクエリパラメータを宣言するには明示的に`Query`を使用する必要があります。そうしない場合、リクエストボディと解釈されます。
    
    対話的APIドキュメントは複数の値を許可するために自動的に更新されます。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 10.5K bytes
    - Viewed (1)
  8. docs/em/docs/tutorial/query-params-str-validations.md

        "foo",
        "bar"
      ]
    }
    ```
    
    #### ⚙️ `list`
    
    👆 💪 ⚙️ `list` 🔗 ↩️ `List[str]` (⚖️ `list[str]` 🐍 3️⃣.9️⃣ ➕):
    
    ```Python hl_lines="7"
    {!../../../docs_src/query_params_str_validations/tutorial013.py!}
    ```
    
    !!! note
        ✔️ 🤯 👈 👉 💼, FastAPI 🏆 🚫 ✅ 🎚 📇.
    
        🖼, `List[int]` 🔜 ✅ (& 📄) 👈 🎚 📇 🔢. ✋️ `list` 😞 🚫🔜.
    
    ## 📣 🌅 🗃
    
    👆 💪 🚮 🌅 ℹ 🔃 🔢.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  9. fastapi/params.py

    import warnings
    from enum import Enum
    from typing import Any, Callable, Dict, List, Optional, Sequence, Union
    
    from fastapi.openapi.models import Example
    from pydantic.fields import FieldInfo
    from typing_extensions import Annotated, deprecated
    
    from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  10. docs/en/docs/tutorial/response-model.md

    `response_model` receives the same type you would declare for a Pydantic model field, so, it can be a Pydantic model, but it can also be, e.g. a `list` of Pydantic models, like `List[Item]`.
    
    FastAPI will use this `response_model` to do all the data documentation, validation, etc. and also to **convert and filter the output data** to its type declaration.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
Back to top