Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 30 for ORJSONResponse (0.12 seconds)

  1. docs/en/docs/reference/responses.md

    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
        HTMLResponse,
        JSONResponse,
        ORJSONResponse,
        PlainTextResponse,
        RedirectResponse,
        Response,
        StreamingResponse,
        UJSONResponse,
    )
    ```
    
    ## FastAPI Responses
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Click Count (0)
  2. docs/zh/docs/advanced/custom-response.md

    /// note | 说明
    
    如果你使用不带有任何媒体类型的响应类,FastAPI 认为你的响应没有任何内容,所以不会在生成的OpenAPI文档中记录响应格式。
    
    ///
    
    ## 使用 `ORJSONResponse`
    
    例如,如果你需要压榨性能,你可以安装并使用 <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> 并将响应设置为 `ORJSONResponse`。
    
    导入你想要使用的 `Response` 类(子类)然后在 *路径操作装饰器* 中声明它。
    
    {* ../../docs_src/custom_response/tutorial001b.py hl[2,7] *}
    
    /// info | 提示
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 7.5K bytes
    - Click Count (0)
  3. docs/ja/docs/advanced/custom-response.md

    /// note | 備考
    
    メディアタイプを指定せずにレスポンスクラスを利用すると、FastAPIは何もコンテンツがないことを期待します。そのため、生成されるOpenAPIドキュメントにレスポンスフォーマットが記載されません。
    
    ///
    
    ## `ORJSONResponse` を使う
    
    例えば、パフォーマンスを出したい場合は、<a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>をインストールし、`ORJSONResponse`をレスポンスとしてセットすることができます。
    
    使いたい `Response` クラス (サブクラス) をインポートし、 *path operationデコレータ* に宣言します。
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 10.4K bytes
    - Click Count (0)
  4. tests/test_default_response_class.py

    from fastapi.testclient import TestClient
    
    
    class ORJSONResponse(JSONResponse):
        media_type = "application/x-orjson"
    
        def render(self, content: Any) -> bytes:
            return orjson.dumps(content)
    
    
    class OverrideResponse(JSONResponse):
        media_type = "application/x-override"
    
    
    app = FastAPI(default_response_class=ORJSONResponse)
    router_a = APIRouter()
    router_a_a = APIRouter()
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Mar 01 20:49:20 GMT 2020
    - 5.2K bytes
    - Click Count (0)
  5. pyproject.toml

        # For Starlette's schema generation, would not be used with FastAPI
        "pyyaml >=5.3.1",
        # For UJSONResponse
        "ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
        # For ORJSONResponse
        "orjson >=3.2.1",
        # To validate email fields
        "email-validator >=2.0.0",
        # Uvicorn with uvloop
        "uvicorn[standard] >=0.12.0",
        # Settings management
        "pydantic-settings >=2.0.0",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 9.3K bytes
    - Click Count (0)
  6. docs/uk/docs/index.md

    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Необхідно, якщо Ви хочете використовувати `ORJSONResponse`.
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Необхідно, якщо Ви хочете використовувати `UJSONResponse`.
    
    Ви можете встановити все це за допомогою `pip install fastapi[all]`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 24.2K bytes
    - Click Count (0)
  7. docs/zh/docs/index.md

    用于 FastAPI / Starlette:
    
    * <a href="https://www.uvicorn.dev" target="_blank"><code>uvicorn</code></a> - 用于加载和运行你的应用程序的服务器。
    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - 使用 `ORJSONResponse` 时安装。
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - 使用 `UJSONResponse` 时安装。
    
    你可以通过 `pip install "fastapi[all]"` 命令来安装以上所有依赖。
    
    ## 许可协议
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 18.2K bytes
    - Click Count (0)
  8. docs/tr/docs/index.md

    * <a href="https://www.uvicorn.dev" target="_blank"><code>uvicorn</code></a> - oluşturduğumuz uygulamayı servis edecek web sunucusu görevini üstlenir.
    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - `ORJSONResponse` kullanacaksanız gereklidir.
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - `UJSONResponse` kullanacaksanız gerekli.
    
    Bunların hepsini `pip install fastapi[all]` ile yükleyebilirsin.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 21.9K bytes
    - Click Count (0)
  9. docs/ru/docs/index.md

    Дополнительные опциональные зависимости FastAPI:
    
    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> — обязателен, если вы хотите использовать `ORJSONResponse`.
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> — обязателен, если вы хотите использовать `UJSONResponse`.
    
    ## Лицензия { #license }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Dec 11 21:25:03 GMT 2025
    - 32K bytes
    - Click Count (0)
  10. docs/fr/docs/index.md

    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Obligatoire si vous voulez utiliser `ORJSONResponse`.
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Obligatoire si vous souhaitez utiliser `UJSONResponse`.
    
    Vous pouvez tout installer avec `pip install fastapi[all]`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 22K bytes
    - Click Count (0)
Back to Top