import orjson from ninja import NinjaAPI from ninja.renderers import BaseRenderer class ORJSONRenderer(BaseRenderer): media_type = "application/json" def render(self, request, data, *, response_status): return orjson.dumps(data)