Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 116 for Item (0.13 sec)

  1. tests/test_tuples.py

    
    class ItemGroup(BaseModel):
        items: List[Tuple[str, str]]
    
    
    class Coordinate(BaseModel):
        x: float
        y: float
    
    
    @app.post("/model-with-tuple/")
    def post_model_with_tuple(item_group: ItemGroup):
        return item_group
    
    
    @app.post("/tuple-of-models/")
    def post_tuple_of_models(square: Tuple[Coordinate, Coordinate]):
        return square
    
    
    @app.post("/tuple-form/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_an.py

        response = client.get(
            "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}]
    
    
    def test_read_system_status():
        access_token = get_access_token()
        response = client.get(
            "/status/", headers={"Authorization": f"Bearer {access_token}"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. docs/ru/docs/python-types.md

    <img src="/img/python-types/image05.png">
    
    Без типов добиться этого практически невозможно.
    
    Обратите внимание, что переменная `item` является одним из элементов списка `items`.
    
    И все же редактор знает, что это `str`, и поддерживает это.
    
    #### `Tuple` и `Set`
    
    Вы бы сделали то же самое, чтобы объявить `tuple` и `set`:
    
    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)
  4. docs/zh/docs/tutorial/bigger-applications.md

    ```Python hl_lines="5-10  16  21" title="app/routers/items.py"
    {!../../../docs_src/bigger_applications/app/routers/items.py!}
    ```
    
    由于每个*路径操作*的路径都必须以 `/` 开头,例如:
    
    ```Python hl_lines="1"
    @router.get("/{item_id}")
    async def read_item(item_id: str):
        ...
    ```
    
    ...前缀不能以 `/` 作为结尾。
    
    因此,本例中的前缀为 `/items`。
    
    我们还可以添加一个 `tags` 列表和额外的 `responses` 列表,这些参数将应用于此路由器中包含的所有*路径操作*。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/body-nested-models.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="9  14  20  23  27"
        {!> ../../../docs_src/body_nested_models/tutorial007.py!}
        ```
    
    !!! info
        Beachten Sie, wie `Offer` eine Liste von `Item`s hat, von denen jedes seinerseits eine optionale Liste von `Image`s hat.
    
    ## Bodys aus reinen Listen
    
    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)
  6. docs/en/docs/python-types.md

        ```
    
    This means:
    
    * The variable `prices` is a `dict`:
        * The keys of this `dict` are of type `str` (let's say, the name of each item).
        * The values of this `dict` are of type `float` (let's say, the price of each item).
    
    #### Union
    
    You can declare that a variable can be any of **several types**, for example, an `int` or a `str`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/query-params-str-validations.md

    ## Псевдонимы параметров
    
    Представьте, что вы хотите использовать query-параметр с названием `item-query`.
    
    Например:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    Но `item-query` является невалидным именем переменной в Python.
    
    Наиболее похожее валидное имя `item_query`.
    
    Но вам всё равно необходим `item-query`...
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 38K bytes
    - Viewed (0)
  8. docs/pt/docs/index.md

    ---
    
    Nós arranhamos apenas a superfície, mas você já tem idéia de como tudo funciona.
    
    Experimente mudar a seguinte linha:
    
    ```Python
        return {"item_name": item.name, "item_id": item_id}
    ```
    
    ...de:
    
    ```Python
            ... "item_name": item.name ...
    ```
    
    ...para:
    
    ```Python
            ... "item_price": item.price ...
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 29 05:18:04 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/query-params-str-validations.md

        ```
    
    ## Alias-Parameter
    
    Stellen Sie sich vor, der Parameter soll `item-query` sein.
    
    Wie in:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    Aber `item-query` ist kein gültiger Name für eine Variable in Python.
    
    Am ähnlichsten wäre `item_query`.
    
    Aber Sie möchten dennoch exakt `item-query` verwenden.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 17:58:59 GMT 2024
    - 27.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_updates/test_tutorial001.py

                        },
                        "summary": "Read Item",
                        "operationId": "read_item_items__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "string"},
                                "name": "item_id",
                                "in": "path",
                            }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
Back to top