Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 291 - 300 of 839 for python (0.04 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/bucket/notifications/README.md

    ```
    
    ### Step 3: Test on RabbitMQ
    
    The python program below waits on the queue exchange `bucketevents` and prints event notifications on the console. We use [Pika Python Client](https://www.rabbitmq.com/tutorials/tutorial-three-python.html) library to do this.
    
    ```py
    #!/usr/bin/env python
    import pika
    
    connection = pika.BlockingConnection(pika.ConnectionParameters(
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue Aug 12 18:20:36 GMT 2025
    - 84.2K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/response-model.md

    但如果你的資料在模型中對於有預設值的欄位也有實際值,例如 ID 為 `bar` 的項目:
    
    ```Python hl_lines="3  5"
    {
        "name": "Bar",
        "description": "The bartenders",
        "price": 62,
        "tax": 20.2
    }
    ```
    
    它們會被包含在回應中。
    
    #### 與預設值相同的資料 { #data-with-the-same-values-as-the-defaults }
    
    如果資料的值與預設值相同,例如 ID 為 `baz` 的項目:
    
    ```Python hl_lines="3  5-6"
    {
        "name": "Baz",
        "description": None,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 14.5K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/response-status-code.md

    ///
    
    The `status_code` parameter receives a number with the HTTP status code.
    
    /// info
    
    `status_code` can alternatively also receive an `IntEnum`, such as Python's [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus).
    
    ///
    
    It will:
    
    * Return that status code in the response.
    * Document it as such in the OpenAPI schema (and so, in the user interfaces):
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/response-status-code.md

    請注意,`status_code` 是「裝飾器(decorator)」方法(`get`、`post` 等等)的參數,而不是你的「路徑操作函式」的參數,就像所有的參數與 body 一樣。
    
    ///
    
    參數 `status_code` 接受一個數字作為 HTTP 狀態碼。
    
    /// info | 資訊
    
    `status_code` 也可以接收一個 `IntEnum`,例如 Python 的 [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus)。
    
    ///
    
    它會:
    
    * 在回應中傳回該狀態碼。
    * 在 OpenAPI 結構中如此記錄(因此也會反映在使用者介面中):
    
    <img src="/img/tutorial/response-status-code/image01.png">
    
    /// note | 注意
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/tutorial/middleware.md

    /// tip
    
    這裡我們使用 [`time.perf_counter()`](https://docs.python.org/3/library/time.html#time.perf_counter) 而不是 `time.time()`,因為在這些用例中它可能更精確。🤓
    
    ///
    
    ## 多個中介軟體的執行順序 { #multiple-middleware-execution-order }
    
    當你使用 `@app.middleware()` 裝飾器或 `app.add_middleware()` 方法加入多個中介軟體時,每個新的中介軟體都會包裹應用程式,形成一個堆疊。最後加入的中介軟體位於最外層,最先加入的位於最內層。
    
    在請求路徑上,最外層的中介軟體最先執行。
    
    在回應路徑上,它最後執行。
    
    例如:
    
    ```Python
    app.add_middleware(MiddlewareA)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  6. docs/zh/docs/advanced/async-tests.md

    `TestClient` 在内部通过一些“魔法”操作,使得您可以在普通的 `def` 测试函数中调用异步的 FastAPI 应用程序,并使用标准的 pytest。但当我们在异步函数中使用它时,这种“魔法”就不再生效了。由于测试以异步方式运行,我们无法在测试函数中继续使用 `TestClient`。
    
    `TestClient` 是基于 [HTTPX](https://www.python-httpx.org) 的。幸运的是,我们可以直接使用它来测试 API。
    
    ## 示例 { #example }
    
    举个简单的例子,让我们来看一个与[更大的应用](../tutorial/bigger-applications.md)和[测试](../tutorial/testing.md)中描述的类似文件结构:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    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)
  7. docs/ko/docs/tutorial/body-updates.md

    {* ../../docs_src/body_updates/tutorial001_py310.py hl[28:33] *}
    
    `PUT`은 기존 데이터를 **대체**해야 하는 데이터를 받는 데 사용합니다.
    
    ### 대체 시 주의사항 { #warning-about-replacing }
    
    즉, `PUT`으로 항목 `bar`를 업데이트하면서 다음과 같은 body를 보낸다면:
    
    ```Python
    {
        "name": "Barz",
        "price": 3,
        "description": None,
    }
    ```
    
    이미 저장된 속성 `"tax": 20.2`가 포함되어 있지 않기 때문에, 입력 모델은 `"tax": 10.5`라는 기본값을 사용하게 됩니다.
    
    그리고 데이터는 그 “새로운” `tax` 값 `10.5`로 저장됩니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 4.8K bytes
    - Click Count (0)
  8. docs/ja/docs/how-to/general.md

    ## レスポンス性能の最適化 - レスポンスモデル - 戻り値の型 { #optimize-response-performance-response-model-return-type }
    
    JSON データを返す際の性能を最適化するには、戻り値の型またはレスポンスモデルを使用してください。そうすることで、Pydantic が Python を経由せずに Rust 側で JSON へのシリアライズを処理します。詳細は [チュートリアル - レスポンスモデル - 戻り値の型](../tutorial/response-model.md) を参照してください。
    
    ## ドキュメントのタグ - OpenAPI { #documentation-tags-openapi }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 3.5K bytes
    - Click Count (0)
  9. docs/en/docs/management-tasks.md

        * Unless it's a feature we want to discourage, like support for a corner case that we don't want users to use.
    * The docs should include a source example file, not write Python directly in Markdown.
    * If the source example(s) file can have different syntax for different Python versions, there should be different versions of the file, and they should be shown in tabs in the docs.
    * There should be tests testing the source example.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 13:59:26 GMT 2026
    - 10.7K bytes
    - Click Count (0)
  10. docs/ko/docs/how-to/custom-request-and-route.md

    여기서는 원본 요청으로부터 `GzipRequest`를 만들기 위해 이를 사용합니다.
    
    {* ../../docs_src/custom_request_and_route/tutorial001_an_py310.py hl[19:27] *}
    
    /// note | 기술 세부사항
    
    `Request`에는 `request.scope` 속성이 있는데, 이는 요청과 관련된 메타데이터를 담고 있는 Python `dict`입니다.
    
    `Request`에는 또한 `request.receive`가 있는데, 이는 요청의 바디를 "받기(receive)" 위한 함수입니다.
    
    `scope` `dict`와 `receive` 함수는 모두 ASGI 명세의 일부입니다.
    
    그리고 이 두 가지, `scope`와 `receive`가 새로운 `Request` 인스턴스를 만드는 데 필요한 것들입니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 5.2K bytes
    - Click Count (0)
Back to Top