I don't get all these arguments. You would really prefer to use hard-to-check shell script to simply installing system python package if it isn't installed already?
Because it allows for scripting infrastructure with far fewer obfuscated hacks than bash/awk. And if you use system python, vulnerabilities are more likely to get patched by distribution vendor. Your homebrewn json parsing regexes won't.