[Tutor] Avoiding reauthentication to web services?

Ryan on the Beach simon_seys at hotmail.com
Thu Jul 21 18:24:01 CEST 2011



Hello.
I am trying to write a python program to control a  lighting controller through it's rest interface.  It requires ssl and basic authentication.  I have been successful using urllib2.  However, the authentication takes a very long time on the controller so multiple http gets are slow.  I believe this is because of the controller itself.
In a web browser after I authenticate each request is very fast, presumably because the browser is not re-authenticating again and again.    In an attempt to fix this I tried httplib2 after some googling thinking it might give me the desired result, but it does not either.  
Can anyone suggest how this would be accomplished?  I want to keep the connection "open".  At least so it does not re-authenticate over and over again, similar to how it works within a web browser.  Is this possible?
Thanks.Si. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110721/81435e7e/attachment.html>


More information about the Tutor mailing list