import json
import urllib.request
tough hey
> The Requests package is recommended for a higher-level HTTP client interface.
The documentation recommends nothing of the sort, it's a direction for consumers. We all live in varied and different worlds, how many varied server environments have you been responsible for all at once? Is it really beyond your amazing programming skills to use the tools at hand in every circumstance? Perhaps it's a chance to demonstrate yet another 3rd party tool which fixes non-existent problems.
It's a few bytes difference in your script that is using requests over the numerous and plentiful stdlib options there.
Each to their own. Simply saying what I would look for.
Have any examples of your apt install jq script? How would you install jq on a few hundred machines also?
I'd be happy to share an example of an out of the box python script that does the same job and works virtually everywhere.
How many of those servers have something like requests installed out of the box vs needing to fetch it via a package manager or PyPI?
jq is available in Ubuntu's universe repository along with requests.