April 8th, 2008 | Published in Google Code
The 220.127.116.11 release of the gdata-python-client has a couple of nifty new features which I thought are worth mentioning. First, is a new module which allows the Python library to be used on Google App Engine. Since the App Engine runs a sandboxed Python interpreter, HTTP calls must be made using one of the App Engine's APIs: urlfetch. After some refactoring of the library's code, I was able to write a drop-in replacement for making HTTP requests, so that the gdata.service module can be used on Google App Engine. To use urlfetch instead of the library's default (httplib), you would use the following:
import gdata.serviceThis refactoring has the added benefit of making it easier to swap out the HTTP transport layer from under the gdata.service module. I'm planning to take advantage of this for a new mock_service module to use in unit tests, and the door is open if people want to help with that or other ideas (I've been meaning to support httplib2, and will one of these days).
# Use urlfetch instead of httplib
gdata.service.http_request_handler = gdata.urlfetch
Second, I'd like to extend a big thank you to Dag Brattli , who wrote modules for the Google Contacts API. Now you can access and manage your Gmail contacts using the same Python library you've come to know. (and maybe, dare I say, love?) Dag is the latest in a long line of contributors to whom I owe a debt of gratitude. This library wouldn't have support for Contacts and other services and use cases without the hard work of Dag, Takashi, Håvard, Benoit, and others who have submitted patches or reported issues (apologies if I've forgotten anyone).
Updated (April 10th, 2008) to reference release 18.104.22.168 instead of 1.0.12. The new release fixes an issue with importing