Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 469 for orjson (0.03 sec)

  1. docs_src/custom_response/tutorial009c_py39.py

    from typing import Any
    
    import orjson
    from fastapi import FastAPI, Response
    
    app = FastAPI()
    
    
    class CustomORJSONResponse(Response):
        media_type = "application/json"
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed"
            return orjson.dumps(content, option=orjson.OPT_INDENT_2)
    
    
    @app.get("/", response_class=CustomORJSONResponse)
    async def main():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 451 bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    For example, let's say that you want to use <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, but with some custom settings not used in the included `ORJSONResponse` class.
    
    Let's say you want it to return indented and formatted JSON, so you want to use the orjson option `orjson.OPT_INDENT_2`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/custom-response.md

    Nehmen wir zum Beispiel an, dass Sie <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> verwenden möchten, aber mit einigen benutzerdefinierten Einstellungen, die in der enthaltenen `ORJSONResponse`-Klasse nicht verwendet werden.
    
    Sie möchten etwa, dass Ihre Response eingerücktes und formatiertes JSON zurückgibt. Dafür möchten Sie die orjson-Option `orjson.OPT_INDENT_2` verwenden.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  4. docs/ru/docs/advanced/custom-response.md

    Например, предположим, что вы хотите использовать <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, но с некоторыми пользовательскими настройками, которые не используются во встроенном классе `ORJSONResponse`.
    
    Скажем, вы хотите, чтобы возвращался отформатированный JSON с отступами, то есть хотите использовать опцию orjson `orjson.OPT_INDENT_2`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  5. docs/pt/docs/advanced/custom-response.md

    Por exemplo, vamos supor que você queira utilizar o <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, mas com algumas configurações personalizadas que não estão incluídas na classe `ORJSONResponse`.
    
    Vamos supor também que você queira retornar um JSON indentado e formatado, então você quer utilizar a opção `orjson.OPT_INDENT_2` do orjson.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  6. docs/es/docs/advanced/custom-response.md

    Por ejemplo, digamos que quieres usar <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a>, pero con algunas configuraciones personalizadas no utilizadas en la clase `ORJSONResponse` incluida.
    
    Digamos que quieres que devuelva JSON con sangría y formato, por lo que quieres usar la opción de orjson `orjson.OPT_INDENT_2`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  7. requirements-tests.txt

    strawberry-graphql >=0.200.0,< 1.0.0
    anyio[trio] >=3.2.1,<5.0.0
    PyJWT==2.9.0
    pyyaml >=5.3.1,<7.0.0
    pwdlib[argon2] >=0.2.1
    inline-snapshot>=0.21.1
    pytest-codspeed==4.2.0
    # types
    types-ujson ==5.10.0.20240515
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 394 bytes
    - Viewed (0)
  8. pyproject.toml

        "itsdangerous >=1.1.0",
        # 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
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  9. docs/de/docs/index.md

    Zusätzliche optionale FastAPI-Abhängigkeiten:
    
    * <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> – erforderlich, wenn Sie `ORJSONResponse` verwenden möchten.
    * <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> – erforderlich, wenn Sie `UJSONResponse` verwenden möchten.
    
    ## Lizenz { #license }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 09:39:53 UTC 2025
    - 25.8K bytes
    - Viewed (0)
  10. 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 }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 32K bytes
    - Viewed (0)
Back to top