Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 30 for ORJSONResponse (0.15 seconds)

  1. docs/ru/docs/advanced/custom-response.md

    ///
    
    ## Используйте `ORJSONResponse` { #use-orjsonresponse }
    
    Например, если вы выжимаете максимум производительности, вы можете установить и использовать <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> и задать ответ как `ORJSONResponse`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 19.7K bytes
    - Click Count (0)
  2. docs_src/custom_response/tutorial001b_py39.py

    from fastapi import FastAPI
    from fastapi.responses import ORJSONResponse
    
    app = FastAPI()
    
    
    @app.get("/items/", response_class=ORJSONResponse)
    async def read_items():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 215 bytes
    - Click Count (0)
  3. docs/es/docs/advanced/custom-response.md

    ///
    
    ## Usa `ORJSONResponse` { #use-orjsonresponse }
    
    Por ejemplo, si estás exprimendo el rendimiento, puedes instalar y usar <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> y establecer el response como `ORJSONResponse`.
    
    Importa la clase `Response` (sub-clase) que quieras usar y declárala en el *path operation decorator*.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 13.2K bytes
    - Click Count (0)
  4. docs/pt/docs/advanced/custom-response.md

    ///
    
    ## Utilizando `ORJSONResponse` { #use-orjsonresponse }
    
    Por exemplo, se você precisa bastante de performance, você pode instalar e utilizar o <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> e definir a resposta para ser uma `ORJSONResponse`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 13.8K bytes
    - Click Count (0)
  5. docs_src/custom_response/tutorial010_py39.py

    from fastapi import FastAPI
    from fastapi.responses import ORJSONResponse
    
    app = FastAPI(default_response_class=ORJSONResponse)
    
    
    @app.get("/items/")
    async def read_items():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 205 bytes
    - Click Count (0)
  6. fastapi/responses.py

        """
    
        def render(self, content: Any) -> bytes:
            assert ujson is not None, "ujson must be installed to use UJSONResponse"
            return ujson.dumps(content, ensure_ascii=False).encode("utf-8")
    
    
    class ORJSONResponse(JSONResponse):
        """
        JSON response using the high-performance orjson library to serialize data to JSON.
    
        Read more about it in the
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Click Count (0)
  7. tests/test_orjson_response_class.py

    from fastapi import FastAPI
    from fastapi.responses import ORJSONResponse
    from fastapi.testclient import TestClient
    from sqlalchemy.sql.elements import quoted_name
    
    app = FastAPI(default_response_class=ORJSONResponse)
    
    
    @app.get("/orjson_non_str_keys")
    def get_orjson_non_str_keys():
        key = quoted_name(value="msg", quote=False)
        return {key: "Hello World", 1: 1}
    
    
    client = TestClient(app)
    
    
    def test_orjson_non_str_keys():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Sep 02 10:17:31 GMT 2022
    - 562 bytes
    - Click Count (0)
  8. docs/en/docs/advanced/custom-response.md

    ///
    
    ## Use `ORJSONResponse` { #use-orjsonresponse }
    
    For example, if you are squeezing performance, you can install and use <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> and set the response to be `ORJSONResponse`.
    
    Import the `Response` class (sub-class) you want to use and declare it in the *path operation decorator*.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 12.4K bytes
    - Click Count (0)
  9. docs/de/docs/advanced/custom-response.md

    ///
    
    ## `ORJSONResponse` verwenden { #use-orjsonresponse }
    
    Um beispielsweise noch etwas Leistung herauszuholen, können Sie <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> installieren und die Response als `ORJSONResponse` setzen.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 14.4K bytes
    - Click Count (0)
  10. docs/ko/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` 클래스(하위 클래스)를 임포트한 후, **경로 작업 데코레이터*에서 선언하세요.
    
    대규모 응답의 경우, 딕셔너리를 반환하는 것보다 `Response`를 반환하는 것이 훨씬 빠릅니다.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Feb 15 11:21:20 GMT 2025
    - 13.4K bytes
    - Click Count (0)
Back to Top