In my previous post we handled timeouts with requests. This post deals with making it easier to react to the errors using the built-in retry features. In this context let’s limit the retry-requiring cases in two categories: Cases that timed out (no response from the server) Cases that returned a transient error from the server […]
Tag: requests
Handling Timeouts with Python Requests
The most usual way of making HTTP/HTTPS requests in Python applications is using the requests library. By default it doesn’t define any timeouts for the operations. It means that in specific circumstances a simple requests.get() call might not return at all. Depending on the nature of the application this is not desirable. This post demonstrates […]
Timeout and Self-signed CA Handling in Pynetbox 5.x
Since pynetbox 5.0 it is possible to set the HTTP request connect timeout in your pynetbox.Api instance. Actually, it is not just a timeout value but you can instantiate a full requests.Session() object to customize the HTTP calls. As a side effect, since the SSL/TLS certificate checking parameter can also be set in the session […]