Search Options

Results per page
Sort
Preferred Languages
Advance

Results 611 - 620 of 1,721 for item (0.04 sec)

  1. docs/em/docs/advanced/dataclasses.md

    ```
    
    1️⃣. 👥 🗄 `field` ⚪️➡️ 🐩 `dataclasses`.
    
    2️⃣. `pydantic.dataclasses` 💧-♻ `dataclasses`.
    
    3️⃣. `Author` 🎻 🔌 📇 `Item` 🎻.
    
    4️⃣. `Author` 🎻 ⚙️ `response_model` 🔢.
    
    5️⃣. 👆 💪 ⚙️ 🎏 🐩 🆎 ✍ ⏮️ 🎻 📨 💪.
    
        👉 💼, ⚫️ 📇 `Item` 🎻.
    
    6️⃣. 📥 👥 🛬 📖 👈 🔌 `items` ❔ 📇 🎻.
    
        FastAPI 🎯 <abbr title="converting the data to a format that can be transmitted">✍</abbr> 💽 🎻.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. docs_src/query_params_str_validations/tutorial009.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Union[str, None] = Query(default=None, alias="item-query")):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 313 bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

              mapEntry("five", collectionOf(5)));
        }
    
        // javac7 can't infer the type parameters correctly in samples()
        private static Collection<Integer> collectionOf(int item) {
          return ImmutableSet.of(item);
        }
    
        @Override
        public Map<String, Collection<Integer>> create(Object... elements) {
          ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/body.md

    * Ihnen die erhaltenen Daten im Parameter `item` übergeben.
        * Da Sie diesen in der Funktion als vom Typ `Item` deklariert haben, erhalten Sie die ganze Editor-Unterstützung (Autovervollständigung, usw.) für alle Attribute und deren Typen.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/body.md

    ```Python hl_lines="18"
    {!> ../../docs_src/body/tutorial001.py!}
    ```
    
    ////
    
    ……此处,请求体参数的类型为 `Item` 模型。
    
    ## 结论
    
    仅使用 Python 类型声明,**FastAPI** 就可以:
    
    * 以 JSON 形式读取请求体
    * (在必要时)把请求体转换为对应的类型
    * 校验数据:
        * 数据无效时返回错误信息,并指出错误数据的确切位置和内容
    * 把接收的数据赋值给参数 `item`
        * 把函数中请求体参数的类型声明为 `Item`,还能获得代码补全等编辑器支持
    * 为模型生成 <a href="https://json-schema.org" class="external-link" target="_blank">JSON Schema</a>,在项目中所需的位置使用
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. tests/test_get_request_body.py

            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/product": {
                    "get": {
                        "summary": "Create Item",
                        "operationId": "create_item_product_get",
                        "requestBody": {
                            "content": {
                                "application/json": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/body.md

    * Складывает полученные данные в параметр `item`.
        * Поскольку внутри функции вы объявили его с типом `Item`, то теперь у вас есть поддержка со стороны редактора (автодополнение и т.п.) для всех атрибутов и их типов.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "post": {
                        "summary": "Create Item",
                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
                                "application/json": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/query-params-str-validations.md

    ```Python hl_lines="13"
    {!../../docs_src/query_params_str_validations/tutorial008.py!}
    ```
    
    ## 别名参数
    
    假设你想要查询参数为 `item-query`。
    
    像下面这样:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    但是 `item-query` 不是一个有效的 Python 变量名称。
    
    最接近的有效名称是 `item_query`。
    
    但是你仍然要求它在 URL 中必须是 `item-query`...
    
    这时你可以用 `alias` 参数声明一个别名,该别名将用于在 URL 中查找查询参数值:
    
    ```Python hl_lines="9"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. docs_src/path_params_numeric_validations/tutorial004_an.py

    from fastapi import FastAPI, Path
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=1)], q: str
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 327 bytes
    - Viewed (0)
Back to top