Requests Library is nice

Experimented with replacing a few urllib2 calls in a product today with the requests library.  Yes, requests really is nice (sat down and read through the code last night).  One thing that's not obvious from the docs, to do digest auth, you pass (username, password, 'digest') as the auth parameter.  There are a number of other options, but digest is the one I ran into.
Using it didn't actually save much code in the project today, as we'd already wrapped our code with a little urllib2 wrapper that was specific to the tasks at hand, but now we can drop that wrapper, which will save us 20 lines of code.


Comments are closed.


Pingbacks are closed.