Aaran_Stent1
asked on
How to interpret google docs gdata atom.Content in python
I am trying to import data from a google spreadsheet and programatically create objects from it. I have been able to see the data but cant understand how to process each filed. I have attached the code I have so far.
How do I access the fields of data and create objects from them. It looks like a dictionary object but I cant read the fields by name.
How do I access the fields of data and create objects from them. It looks like a dictionary object but I cant read the fields by name.
import gdata
import gdata.spreadsheet.service
import gdata.docs.service
import atom.core
gd_client = gdata.spreadsheet.service.SpreadsheetsService()
gd_client.email = 'firstname.lastname@gmail.com'
gd_client.password = 'password'
gd_client.source = 'my-exporter-1'
gd_client.ProgrammaticLogin()
key = 'biglongggoledockey'
def ListGetAction(gd_client, key, wksht_id):
# Get the list feed
feed = gd_client.GetListFeed(key, wksht_id)
for line in feed.entry:
print line.content.text
ASKER
i have spent a long time reading the api. i just need a example of how to iterate through the atom feed/content please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I searched for the spreadsheet object and found the example rather than the atom content object i was looking at
http://code.google.com/apis/documents/docs/1.0/developers_guide_python.html