Skip to main content

When want to grab your data from Google Analytics: gagrab it.

Project description

https://travis-ci.org/ambitioninc/gagrab.png https://coveralls.io/repos/ambitioninc/gagrab/badge.png?branch=develop Latest PyPI version Number of PyPI downloads

gagrab

The official Google Analytics API is very powerfull and extensive. Sometimes, though, you just want to grab some data and have it returned in a clean format.

from service_account_auth import AuthorizedService
from gagrab import Grabber

my_ga_service = AuthorizedService('my-project-555', 'analytics', 'v3')
grabber = Grabber(my_ga_service)

data = grabber.query(
    view='UA-000000-1',
    metrics=['sessions', 'pageviews'],
    dimensions=['browser', 'userAgeBracket']
    start_date='2014-07-01',
    end_date='2014-08-15',
)

Installation

To install the latest release, type:

pip install gagrab

To install the latest code directly from source, type:

pip install git+git://github.com/ambitioninc/gagrab.git

The gagrab.Grabber object requires a service_account_auth.AuthorizedService object during initialization. Installation and setup instructions for gclient-service-account-auth can be found on the github page https://github.com/ambitioninc/gclient-service-account-auth.

Documentation

Full documentation is available at http://gagrab.readthedocs.org

License

MIT License (see LICENSE)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gagrab-0.2.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page