Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 366 for items (0.16 sec)

  1. docs/en/docs/tutorial/bigger-applications.md

    * look for the subpackage `routers` (the directory at `app/routers/`)...
    * and from it, import the submodule `items` (the file at `app/routers/items.py`) and `users` (the file at `app/routers/users.py`)...
    
    The module `items` will have a variable `router` (`items.router`). This is the same one we created in the file `app/routers/items.py`, it's an `APIRouter` object.
    
    And then we do the same for the module `users`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/bigger-applications.md

    ## 其他使用 `APIRouter` 的模块
    
    假设你在位于 `app/routers/items.py` 的模块中还有专门用于处理应用程序中「项目」的端点。
    
    你具有以下*路径操作*:
    
    * `/items/`
    * `/items/{item_id}`
    
    这和 `app/routers/users.py` 的结构完全相同。
    
    但是我们想变得更聪明并简化一些代码。
    
    我们知道此模块中的所有*路径操作*都有相同的:
    
    * 路径 `prefix`:`/items`。
    * `tags`:(仅有一个 `items` 标签)。
    * 额外的 `responses`。
    * `dependencies`:它们都需要我们创建的 `X-Token` 依赖项。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/query-params.md

                "type": "value_error.missing"
            }
        ]
    }
    ```
    
    `needy` は必須のパラメータなので、URLにセットする必要があります:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ...これはうまくいくでしょう:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    ```
    
    そして当然、あるパラメータを必須に、別のパラメータにデフォルト値を設定し、また別のパラメータをオプショナルにできます:
    
    ```Python hl_lines="10"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/path-params.md

    {!../../../docs_src/path_params/tutorial001.py!}
    ```
    
    Der Wert des Pfad-Parameters `item_id` wird Ihrer Funktion als das Argument `item_id` übergeben.
    
    Wenn Sie dieses Beispiel ausführen und auf <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a> gehen, sehen Sie als Response:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Pfad-Parameter mit Typen
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:28:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  5. docs/fr/docs/external-links.md

    {% for section_name, section_content in external_links.items() %}
    
    ## {{ section_name }}
    
    {% for lang_name, lang_content in section_content.items() %}
    
    ### {{ lang_name }}
    
    {% for item in lang_content %}
    
    * <a href="{{ item.link }}" class="external-link" target="_blank">{{ item.title }}</a> by <a href="{{ item.author_link }}" class="external-link" target="_blank">{{ item.author }}</a>.
    
    {% endfor %}
    {% endfor %}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Oct 22 07:35:13 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/dependencies/index.md

    admin_user(["admin_user"])
    paying_user(["paying_user"])
    
    public["/items/public/"]
    private["/items/private/"]
    activate_user["/users/{user_id}/activate"]
    pro_items["/items/pro/"]
    
    current_user --> active_user
    active_user --> admin_user
    active_user --> paying_user
    
    current_user --> public
    active_user --> private
    admin_user --> activate_user
    paying_user --> pro_items
    ```
    
    ## Интегрировано с **OpenAPI**
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  7. docs/em/docs/external-links.md

    ## 📄
    
    {% for section_name, section_content in external_links.items() %}
    
    ## {{ section_name }}
    
    {% for lang_name, lang_content in section_content.items() %}
    
    ### {{ lang_name }}
    
    {% for item in lang_content %}
    
    * <a href="{{ item.link }}" class="external-link" target="_blank">{{ item.title }}</a> by <a href="{{ item.author_link }}" class="external-link" target="_blank">{{ item.author }}</a>.
    
    {% endfor %}
    {% endfor %}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Oct 22 07:35:13 GMT 2023
    - 929 bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/path-params.md

    {!../../../docs_src/path_params/tutorial001.py!}
    ```
    
    The value of the path parameter `item_id` will be passed to your function as the argument `item_id`.
    
    So, if you run this example and go to <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, you will see a response of:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Path parameters with types
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/path-params.md

    {!../../../docs_src/path_params/tutorial001.py!}
    ```
    
    Значение параметра пути `item_id` будет передано в функцию в качестве аргумента `item_id`.
    
    Если запустите этот пример и перейдёте по адресу: <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, то увидите ответ:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Параметры пути с типами
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/path-params.md

    ```
    
    这段代码把路径参数 `item_id` 的值传递给路径函数的参数 `item_id`。
    
    运行示例并访问 <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>,可获得如下响应:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## 声明路径参数的类型
    
    使用 Python 标准类型注解,声明路径操作函数中路径参数的类型。
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    本例把 `item_id` 的类型声明为 `int`。
    
    !!! check "检查"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top