orjson is the fastest Python library for JSON, could you use orjson in tortoise-orm?
based on pydantic feature it is possible to use orjson on pydantic_model_creator in from tortoise.contrib.pydantic import pydantic_model_creator and instead of rapidjson in fields.data.py the code bellow:
try:
# Use python-rapidjson as an optional accelerator
import rapidjson
JSON_DUMPS = rapidjson.dumps
JSON_LOADS = rapidjson.loads
except ImportError: # pragma: nocoverage
pass
orjson is the fastest Python library for JSON, could you use orjson in tortoise-orm? based on pydantic feature it is possible to use orjson on pydantic_model_creator in
from tortoise.contrib.pydantic import pydantic_model_creator
and instead of rapidjson infields.data.py
the code bellow:use this one based on answer