Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 571 - 580 of 1,014 for iter (0.02 seconds)

  1. docs/zh/docs/advanced/dataclasses.md

    1. 我们仍然从标准库的 `dataclasses` 导入 `field`。
    2. `pydantic.dataclasses` 是 `dataclasses` 的可直接替换版本。
    3. `Author` 数据类包含一个由 `Item` 数据类组成的列表。
    4. `Author` 数据类被用作 `response_model` 参数。
    5. 你可以将其它标准类型注解与数据类一起用作请求体。
    
       在本例中,它是一个 `Item` 数据类列表。
    6. 这里我们返回一个字典,里面的 `items` 是一个数据类列表。
    
       FastAPI 仍然能够将数据<dfn title="把数据转换为可以传输的格式">序列化</dfn>为 JSON。
    7. 这里的 `response_model` 使用了 “`Author` 数据类列表” 的类型注解。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  2. README.md

        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
        return {"item_name": item.name, "item_id": item_id}
    ```
    
    The `fastapi dev` server should reload automatically.
    
    ### Interactive API docs upgrade
    
    Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 24.3K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/index.md

        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
        return {"item_name": item.name, "item_id": item_id}
    ```
    
    `fastapi dev` 伺服器應會自動重新載入。
    
    ### 互動式 API 文件升級 { #interactive-api-docs-upgrade }
    
    前往 [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)。
    
    * 互動式 API 文件會自動更新,包含新的 body:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 20.8K bytes
    - Click Count (0)
  4. docs/tr/docs/tutorial/body-updates.md

    Kısmi güncellemeler almak istiyorsanız, Pydantic modelinin `.model_dump()` metodundaki `exclude_unset` parametresini kullanmak çok faydalıdır.
    
    Örneğin: `item.model_dump(exclude_unset=True)`.
    
    Bu, `item` modeli oluşturulurken set edilmiş verileri içeren; varsayılan değerleri hariç tutan bir `dict` üretir.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 4.5K bytes
    - Click Count (0)
  5. docs/ko/docs/index.md

        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
        return {"item_name": item.name, "item_id": item_id}
    ```
    
    `fastapi dev` 서버는 자동으로 리로딩되어야 합니다.
    
    ### 대화형 API 문서 업그레이드 { #interactive-api-docs-upgrade }
    
    이제 [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)로 이동합니다.
    
    * 대화형 API 문서는 새 본문을 포함해 자동으로 업데이트됩니다:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 23.4K bytes
    - Click Count (0)
  6. docs/zh/docs/tutorial/handling-errors.md

    在介绍依赖项与安全的章节中,你可以更直观地看到用 `raise` 异常代替 `return` 值的优势。
    
    本例中,客户端用不存在的 `ID` 请求 `item` 时,触发状态码为 `404` 的异常:
    
    {* ../../docs_src/handling_errors/tutorial001_py310.py hl[11] *}
    
    ### 响应结果 { #the-resulting-response }
    
    请求为 `http://example.com/items/foo`(`item_id` 为 `"foo"`)时,客户端会接收到 HTTP 状态码 200 及如下 JSON 响应结果:
    
    ```JSON
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  7. scripts/playwright/separate_openapi_schemas/image01.py

        # Update the viewport manually
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_text("POST/items/Create Item").click()
        page.get_by_role("tab", name="Schema").first.click()
        # Manually add the screenshot
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image01.png"
        )
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Sep 13 09:14:46 GMT 2024
    - 974 bytes
    - Click Count (0)
  8. docs/bucket/replication/setup_ilm_expiry_replication.sh

    ## Setup site replication
    ./mc admin replicate add sitea siteb --replicate-ilm-expiry
    
    sleep 10s
    
    ## Add warm tier
    ./mc ilm tier add minio sitea WARM-TIER --endpoint http://localhost:9006 --access-key minio --secret-key minio123 --bucket bucket
    
    ## Add ILM rules
    ./mc ilm add sitea/bucket --transition-days 0 --transition-tier WARM-TIER --transition-days 0 --noncurrent-expire-days 2 --expire-days 3 --prefix "myprefix" --tags "tag1=val1&tag2=val2"
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Sep 06 09:42:21 GMT 2024
    - 12.8K bytes
    - Click Count (0)
  9. docs/pt/docs/benchmarks.md

    Mas quando se checa _benchmarks_ e comparações você deveria ter o seguinte em mente.
    
    ## Benchmarks e velocidade { #benchmarks-and-speed }
    
    Ao verificar os _benchmarks_, é comum observar algumas ferramentas de diferentes tipos comparadas como equivalentes.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  10. docs/en/docs/tutorial/handling-errors.md

    ```JSON
    {
      "item": "The Foo Wrestlers"
    }
    ```
    
    But if the client requests `http://example.com/items/bar` (a non-existent `item_id` `"bar"`), that client will receive an HTTP status code of 404 (the "not found" error), and a JSON response of:
    
    ```JSON
    {
      "detail": "Item not found"
    }
    ```
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 8.9K bytes
    - Click Count (0)
Back to Top