• Python/Orjson/Recipe

    This recipe is a set of codemods that will upgrade json to orjson in your python projects.

  • Python/Orjson/Sentry Import Replacement

    Replaces Sentry json import with orjson.

  • Python/Orjson/Dumps Add UTC Z

    Add OPT_UTC_Z to orjson.dumps.

  • Python/Orjson/Json.Loads

    This codemod converts json.loads to orjson.loads.

  • Python/Orjson/Json.Load

    This codemod converts json.load to orjson.loads. Adds .read() to the file object.

  • Python/Orjson/Json.Dumps

    This codemod converts json.dumps to orjson.dumps().decode(). Should be run before the orjson.dumps-add-UTC_Z codemod.

  • Json Response To Orjson Response

    This custom codemod replaces JSONResponse with ORJSONResponseto bring consistency to the way we handle JSON responses in our codebase. Besides updating the response class, it also updates the imports to use from src.json_encoding import ORJSONResponse.