Skip to content

Instantly share code, notes, and snippets.

@eyliu
Created December 17, 2011 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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. user@gmail.com): ')
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