Backup Google Contacts

Google Contacts Data API

Just a simple Python script to fetch all of your Google contacts in XML format


#!/usr/bin/python

import gdata.contacts.service

gd_client = gdata.contacts.service.ContactsService()
gd_client.ClientLogin('username@domain.com', 'password')
query = gdata.contacts.service.ContactsQuery()
query.max_results = 500 # change for max contacts returned
feed = gd_client.GetContactsFeed(query.ToUri())

print feed

One Response to “Backup Google Contacts”

  1. Backup my google calendars via shell and python scripts and scheduling them via cron « Super Nerdy Cool:

    [...] took the following script online (which requires python and the gdata [...]

Leave a Reply