Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install gapy

How to install gapy

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install gapy
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.0.8 Available View build log
Linux (64-bit)
0.0.8 Available View build log
 
Author
License
https://raw.github.com/robyoung/gapy/master/LICENS
Imports
Lastest release
version 0.0.8 on Jun 5th, 2013

Gapy is a thin service account client for Google Analytics.

Get set up

First you need to create either a service account or client ID in your [Google API Console](https://code.google.com/apis/console). If you're authenticating as a service account you'll need to download your private key. If you're authenticating as a web or installed application you'll need to download your client secrets file (Download JSON in API Access list).

Then just create a gapy client and start querying. Ids, metrics and dimensions are provided without the ga: prefix. They can be provided as lists or single values.

System Message: ERROR/3 (<string>, line 18)

Unknown directive type "code".

.. code :: python

    import gapy

    # For a service account
    client = gapy.client_from_private_key(
        "your account name",
        private_key="your private key",
        storage_path="path/to/storage.db")

    # For a web or installed application
    client = gapy.client_from_secrets_file(
        "/path/to/client_secrets.json",
        storage_path="/path/to/storage.db")
    )


    reach_data = client.query.get("12345",
                datetime(2012, 1, 1),
                datetime(2012, 2, 2),
                ["visits", "visitors"],
                "date")

Subscribe to package updates

Last updated Jun 5th, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.