Skip to content

Instantly share code, notes, and snippets.

@eyliu
Created December 17, 2011 00:56
Show Gist options
  • Save eyliu/1488731 to your computer and use it in GitHub Desktop.
Save eyliu/1488731 to your computer and use it in GitHub Desktop.
# Source: http://code.google.com/apis/gdata/articles/python_client_lib.html
import gdata.docs.service
import getpass
# Create a client class which will make HTTP requests with Google Docs server.
client = gdata.docs.service.DocsService()
# Authenticate using your Google Docs email address and password.
username = raw_input('Google Account (e.g. [email protected]): ')
password = getpass.getpass("%s's password: " % username)
client.ClientLogin(username, password)
# Query the server for an Atom feed containing a list of your documents.
documents_feed = client.GetDocumentListFeed()
# Loop through the feed and extract each document entry.
for document_entry in documents_feed.entry:
# Display the title of the document on the command line.
print "%s \t %s" % (document_entry.title.text, str(document_entry.author[0]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment