Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 904 for Rust (0.02 seconds)

  1. fastapi/.agents/skills/fastapi/SKILL.md

    ```
    
    **Important**: Return types or response models are what filter data ensuring no sensitive information is exposed. And they are used to serialize data with Pydantic (in Rust), this is the main idea that can increase response performance.
    
    The return type doesn't have to be a Pydantic model, it could be a different type, like a list of integers, or a dict, etc.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 10.1K bytes
    - Click Count (0)
  2. docs/en/docs/advanced/custom-response.md

    /// note | Technical Details
    
    You could also use `from starlette.responses import HTMLResponse`.
    
    **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ///
    
    ### `Response` { #response }
    
    The main `Response` class, all the other responses inherit from it.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 11K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/response-model.md

        * This will be used by the **automatic docs**.
        * It will also be used by automatic client code generation tools.
    * **Serialize** the returned data to JSON using Pydantic, which is written in **Rust**, so it will be **much faster**.
    
    But most importantly:
    
    * It will **limit and filter** the output data to what is defined in the return type.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 15.5K bytes
    - Click Count (0)
  4. fastapi/_compat/v2.py

            # What calls this code passes a value that already called
            # self._type_adapter.validate_python(value)
            # This uses Pydantic's dump_json() which serializes directly to JSON
            # bytes in one pass (via Rust), avoiding the intermediate Python dict
            # step of dump_python(mode="json") + json.dumps().
            return self._type_adapter.dump_json(
                value,
                include=include,
                exclude=exclude,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/advanced/custom-response.md

    如果你追求效能,使用[回應模型](../tutorial/response-model.md) 大概會比使用 `orjson` 回應更好。
    
    有了回應模型,FastAPI 會使用 Pydantic 直接將資料序列化為 JSON,而不需要像其他情況那樣先經過 `jsonable_encoder` 之類的中介步驟。
    
    而且在底層,Pydantic 用來序列化為 JSON 的 Rust 機制和 `orjson` 相同,因此用回應模型已經能獲得最佳效能。
    
    ## 預設回應類別 { #default-response-class }
    
    在建立 **FastAPI** 類別實例或 `APIRouter` 時,你可以指定預設要使用哪個回應類別。
    
    用來設定的是 `default_response_class` 參數。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/response-model.md

    * 在 OpenAPI 的「路徑操作」中為回應新增 JSON Schema。
        * 這會被自動文件使用。
        * 也會被自動用戶端程式碼產生工具使用。
    * 使用 Pydantic 將回傳資料**序列化**為 JSON,而 Pydantic 是用 **Rust** 撰寫的,因此會 **更快很多**。
    
    但更重要的是:
    
    * 它會將輸出資料限制並過濾為回傳型別中定義的內容。
        * 這對安全性特別重要,下面會再看到更多細節。
    
    ## `response_model` 參數 { #response-model-parameter }
    
    有些情況下,你需要或想要回傳的資料與你宣告的型別不完全相同。
    
    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)
  7. doc/go_mem.html

    Some compiler optimizations that would be valid in single-threaded programs are not valid in all Go programs.
    In particular, a compiler must not introduce writes that do not exist in the original program,
    it must not allow a single read to observe multiple values,
    and it must not allow a single write to write multiple values.
    </p>
    
    <p>
    All the following examples assume that `*p` and `*q` refer to
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Tue Aug 05 15:41:37 GMT 2025
    - 26.6K bytes
    - Click Count (0)
  8. docs/tr/docs/advanced/custom-response.md

    Ve kaputun altında, Pydantic JSON’a serialize etmek için `orjson` ile aynı Rust tabanlı mekanizmaları kullanır; bu nedenle bir response modeliyle zaten en iyi performansı elde edersiniz.
    
    ## Varsayılan response class { #default-response-class }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  9. docs/es/docs/advanced/custom-response.md

    Con un response model, FastAPI usará Pydantic para serializar los datos a JSON, sin pasos intermedios, como convertirlos con `jsonable_encoder`, que ocurriría en cualquier otro caso.
    
    Y por debajo, Pydantic usa los mismos mecanismos en Rust que `orjson` para serializar a JSON, así que ya obtendrás el mejor rendimiento con un response model.
    
    ## Clase de response por defecto { #default-response-class }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  10. docs/ru/docs/advanced/custom-response.md

    А под капотом Pydantic использует те же базовые механизмы на Rust, что и `orjson`, для сериализации в JSON, так что с моделью ответа вы и так получите лучшую производительность.
    
    ## Класс ответа по умолчанию { #default-response-class }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 17.6K bytes
    - Click Count (0)
Back to Top