Detected a ‘requests’ call without a timeout set. By default, ‘requests’ calls wait until the connection is closed. This means a ‘requests’ call without a timeout will hang the program if a response is never received. Consider setting a timeout for all ‘requests’.
use-raise-for-status
There’s an HTTP request made with requests, but the raise_for_status() utility method isn’t used. This can result in request errors going unnoticed and your code behaving in unexpected ways, such as if your authorization API returns a 500 error while you’re only checking for a 401.
The requests library has a convenient shortcut for sending JSON requests, which lets you stop worrying about serializing the body yourself. To use it, replace body=json.dumps(...) with json=....