Sunday, June 23, 2013

Retrieve contacts with Google Contacts API (Python)

I recently registered an account on codecademy. It was so fun that I completed all Python courses in one day! They also have a course for Python API which I also completed.

Codeacademy badges

As an experiment, I thought of trying to retrieve contacts using GMail API. It was really easy. Here are the steps and requirements:
  1. Python 2.7 installation
  2. Google Data Python Library installation (run setup.py install) from https://developers.google.com/gdata/articles/python_client_lib
  3. Download contacts_example.py from Contacts API v3
  4. Create test account on GMail
  5. Run contacts_example.py. You will be prompted for username and password.

contacts_examples.py

As a last step you wil want to customize the script to fit your needs. Have fun!

No comments:

Post a Comment