4 thoughts on “Google Analytic’s API Using Python and a Service Account”

  1. This is a great post, thanks. Wish I had found it before I spent 6 hours banging my head against the wall/wading through Google’s API “documentation”.

    I ran into a mysterious/frustrating problem with the p12 key. It worked just fine on one installation, but on another installation I kept getting errors about how pyCrypto could not handle a p12 so I should convert to PEM. I had pyOpenSSL installed via pip, but the oauth call kept trying to use pyCrypto instead.

    It turned out that the .14 release of pyOpenSSL is missing a hard dependency – py-cryptography. ‘pip install cryptography’ solved the problem.

    At some point, I also hit problems with ‘six’. Run ‘pip upgrade’ on six solved the problem, I think.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s