{ "info": { "author": "European Environment Agency: IDM2 A-Team", "author_email": "eea-edw-a-team-alerts@googlegroups.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.0", "Framework :: Plone :: 4.1", "Framework :: Plone :: 4.2", "Framework :: Plone :: 4.3", "Framework :: Zope2", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Zope", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========\nEEA Google\n==========\n.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.google/develop\n :target: https://ci.eionet.europa.eu/job/eea/job/eea.google/job/develop/display/redirect\n :alt: develop\n.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.google/master\n :target: https://ci.eionet.europa.eu/job/eea/job/eea.google/job/master/display/redirect\n :alt: master\n\nThis package contains useful tools for talking with Google Analytics.\n\n\nContents\n========\n\n.. contents::\n\n\nMain features\n=============\n\n1. A low level API to access Google API;\n2. A CMF portal tool to store Google connections;\n3. Logic to authenticate with Google Analytics without touching Google\n credentials using `AuthSub tokens`_\n4. Logic to create custom Google Analytics reports using\n `Google Analytics Data Export API`_.\n\nGoogle Analytics reports created this way can be made available via portlets. Right\nnow there is an example under skins folder.\n\n\nGoogle API (eea.google.api)\n===========================\n\nA python package that provides a low level Google Connection and a generic\nconnection error GoogleClientError. To use this connection you'll need an\nAuthBase authentication token. You can get one by calling Google like:\n\nhttps://www.google.com/accounts/AuthSubRequest?scope=https://www.google.com/analytics/feeds/&session=1&next=http://yourdomain.com/do_something_with_token\n\nAfter you login into your Google Analytics account, you'll be asked to grant\naccess to **yourdomain.com** to access Analytics statistics. If you do so, Google\nwill redirect your browser to the **next** link provided, adding a request\nparameter **token=**, in our case\n\nhttp://yourdomain.com/do_something_with_token?token=ADFAFDDKLJH14234__ASDD\n\nAs this token was provided in clear to you, it can be used only once to query\nGoogle API, that's why you'll need to exchange it for a multi-session one.\nBut this time you can not do it from browser. So here eea.google.api comes in.\n\n>>> from eea.google.api import Connection\n>>> google = Connection(token='ADFAFDDKLJH14234__ASDD')\n>>> new_token = google.token2session()\n\nIf you provided an invalid token it will quietly fail and return you a\nNone object, else it will return you a multi-session token. Now you are\nconnected with Google, forever :).\n\nWith this connection you can check it's status:\n\n>>> google.status\n(200, 'OK')\n\nOr make a call:\n\n>>> response = google(scope, data, method='GET')\n\n- scope - the Google service you want to access;\n- data - query parameters\n- method - request method: GET or POST\n\nIf something doesn't work well this will raise a GoogleClientError, else\nit will return a `Google Data Feed Response`_\n\n>>> response.read()\n>> google.request(scope, data, method='GET')\n\n\nGoogle Tool (eea.google.tool)\n=============================\n\nA CMF portal tool that can be retrieved using CMF method getToolByName: This a\nsimple container for Google connections. It provides a basic browser interface\nto add and remove connections.\n\n>>> from Products.CMFCore.utils import getToolByName\n>>> tool = getToolByName(portal, 'portal_google')\n\n\nGoogle Analytics (eea.google.analytics)\n=======================================\n\nThis package provides the browser interface to register with Google Analytics\nand defines two storage models: Analytics and AnalyticsReport. Also it provides\na utility to easily access low level api.Connection and another one to parse\nGoogle response XML.\n\nAnalytics\n---------\nThis will store AuthSub token and it's also a container for Analytics Reports.\nIt provides a basic browser interface to get token from Google and to manage\nreports.\n\nAnalytics Report\n----------------\nA Google Analytics custom report by dimensions, metrics, start-date, end-date,\nfilters and sort order. It is actually a query object for Google Analytics API.\n\n>>> from zope.component import getMultiAdapter\n>>> report = tool.analytics.report\n>>> xml = getMultiAdapter((report, request), 'index.xml')\n\nNow you have a custom XML report based on defined filters.\n\nConnection Utility\n------------------\nEasily access low level eea.google.api.Connection using zope components\n\n>>> from zope.component import getUtility\n>>> from eea.google.analytics.interfaces import IGoogleAnalyticsConnection\n>>> utility = getUtility(IGoogleAnalyticsConnection)\n>>> conn = utility(token='ABCDEFGH__FAH')\n\nXML Parser utility\n------------------\nParse Google reponse XML\n\n>>> from zope.component import getUtility\n>>> from eea.google.analytics.interfaces import IXMLParser\n>>> parse = getUtility(IXMLParser)\n>>> table = parse(xml)\n\nHere table is a (dimensions, metrics) python generator\n\n>>> dimensions, metrics = table.next()\n>>> dimensions\n{'ga:pagePath': '/some/doc/path', 'ga:browser': 'Firefox'}\n\n>>> metrics\n{'ga:pageviews': u'34235', 'ga:timeOnPage': '2433.0'}\n\n\nDependencies\n============\n\n1. python2.4+\n2. Plone 2.5.x or Plone 3.x. (optional if you're using only eea.google.api package).\n\n\nSource code\n===========\n\nLatest source code (Plone 4 compatible):\n https://github.com/eea/eea.google\n\nPlone 2 and 3 compatible:\n https://github.com/eea/eea.google/tree/plone25\n\n\nCopyright and license\n=====================\n\nThe Initial Owner of the Original Code is European Environment Agency (EEA).\nAll Rights Reserved.\n\nThe EEA Google (the Original Code) is free software;\nyou can redistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software Foundation;\neither version 2 of the License, or (at your option) any later\nversion.\n\nContributor(s): Alin Voinea (Eau de Web),\n Antonio De Marinis (European Environment Agency),\n\nMore details under docs/License.txt\n\n\nFunding\n=======\n\nEEA_ - European Enviroment Agency (EU)\n\n\n.. _EEA: https://www.eea.europa.eu/\n.. _`AuthSub tokens`: http://code.google.com/apis/accounts/docs/AuthSub.html\n.. _`Google Analytics Data Export API`: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html\n.. _`Google Data Feed Response`: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html#dataResponse\n\nChangelog\n=========\n\n5.8 - (2019-01-28)\n-----------------------\n* Jenkins: Add sonarqube step\n [avoinea refs #101552]\n* Change: updated URLs pointing to eea.europa.eu with https://\n [alecghica refs #95849]\n\n\n5.7 - (2017-12-12)\n------------------\n* Change: Replace eeacms/zptlint with eeacms/plone-test:4 zptlint\n [avoinea refs #90415]\n\n5.6 - (2017-11-07)\n------------------\n* Change: Remove Sphinx generated documentation\n [petchesi-iulian refs #88212]\n\n5.5 - (2017-05-22)\n------------------\n* Change: fixed PyLint warnings and errors\n [valipod refs #84949]\n\n5.4 - (2017-05-15)\n------------------\n* Change: fixed PyLint warnings and errors\n [eduard-fironda refs #84949]\n\n5.3 - (2017-04-24)\n------------------\n* Change: updated package information\n [eduard-fironda]\n\n5.2 - (2016-05-19)\n------------------\n* Bug fix: Fix pylint warnings\n [ichim-david refs #71940]\n\n5.1 - (2015-10-05)\n------------------\n* Bugfix: set socket timeout to prevent hanging out connection on xmlrpc calling using eventlet\n [lucas refs #29063]\n\n5.0 - (2015-08-18)\n------------------\n* Change: Auto-include zcml within plone context in order to make this package\n work without having to add it within buildout zcml directive.\n [avoinea]\n\n4.9 - (2015-03-17)\n------------------\n* Change: Switched to curl in the jenkins build install script\n [olimpiurob refs #22402]\n* Change: Changed fetch url for jenkins build install script to the install\n script from the main EEA CPB repository\n [olimpiurob refs #22402]\n\n4.8 - (2014-01-22)\n------------------\n* Feature: adding Sphinx-generated documentation in Page Template format\n [batradav refs #9502]\n* Bug fix: removed wrongly added blockquotes within README.rst\n [ichim-david refs #18064]\n\n4.7 - (2013-10-04)\n------------------\n* Change: updated zope imports with the versions that require minimum Plone 4.1\n for eea.google\n [ichimdav refs #15651]\n\n4.6 - (2013-06-17)\n------------------\n* Change: updated link to site setup\n [ghicale]\n\n4.5 - (2013-02-04)\n------------------\n* Bug Fix: Fixed to work with the 2.4 API\n [batradav refs #9551]\n\n4.4 - (2012-07-13)\n------------------\n* Bug Fix: Fixed i18n missing tags in .pt files\n [prospchr refs #5160]\n\n4.3 - (2012-06-12)\n------------------\n* Bug fix: fixed markup of HISTORY.txt file\n [ciobabog refs #5231]\n\n4.2 - (2012-02-06)\n------------------\n * No changes\n\n4.0 - (2011-11-07)\n------------------\n* Cleanup: of pylint, pyflakes warnings\n [ichimdav #4140, #4141]\n* Feature: added upgrade steps\n [voineali #4392]\n* Feature: Plone 4.x compatible release\n [ghicaale #4212]\n\n1.2 (2010-02-24)\n----------------\n* Bug fix: fixed stinky egg\n [ghicale]\n\n1.1 (2010-02-24)\n----------------\n* Bug fix: fixed layout in edit mode\n [voineali #2685]\n\n1.0 (2009-11-09)\n----------------\n* Initial release\n [voineali]\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/eea/eea.google", "keywords": "EEA google api Add-ons Plone Zope", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "eea.google", "package_url": "https://pypi.org/project/eea.google/", "platform": "", "project_url": "https://pypi.org/project/eea.google/", "project_urls": { "Homepage": "https://github.com/eea/eea.google" }, "release_url": "https://pypi.org/project/eea.google/5.8/", "requires_dist": null, "requires_python": "", "summary": "This package contains useful tools for talking with Google Analytics", "version": "5.8" }, "last_serial": 4755983, "releases": { "4.0": [ { "comment_text": "", "digests": { "md5": "8f5224c7048e7600a5665a7348de4bff", "sha256": "01d4222c617bd26f4d180ddcd375025e1dce70a3bfc9fbbe63db5802627669f1" }, "downloads": -1, "filename": "eea.google-4.0.zip", "has_sig": false, "md5_digest": "8f5224c7048e7600a5665a7348de4bff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48092, "upload_time": "2011-11-08T00:46:06", "url": "https://files.pythonhosted.org/packages/7b/83/38d03c14cea819ae30bda6708423b84ed9ee49e7d61fef23f1ba3bef7e7f/eea.google-4.0.zip" } ], "4.2": [ { "comment_text": "", "digests": { "md5": "d7f6b20c29879057682e08adf9c8633c", "sha256": "cc4a05208ae51f41e0c25741109d7ab0082d285e143b098cc2b8c5a52b1d6ece" }, "downloads": -1, "filename": "eea.google-4.2.zip", "has_sig": false, "md5_digest": "d7f6b20c29879057682e08adf9c8633c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48501, "upload_time": "2012-02-08T14:03:38", "url": "https://files.pythonhosted.org/packages/a3/1f/d067ae8d52501d47e4ea66b50da85d5211f772cd366e31c82bc42da3dfb1/eea.google-4.2.zip" } ], "4.3": [ { "comment_text": "", "digests": { "md5": "3673a0b068f31b220fb964bc2321a7fb", "sha256": "2cd0f10e63b6ba1d72da1e0e8a84fc89d0e31b9d3f438eff4295a1d2a1d2763c" }, "downloads": -1, "filename": "eea.google-4.3.zip", "has_sig": false, "md5_digest": "3673a0b068f31b220fb964bc2321a7fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48649, "upload_time": "2012-06-13T12:12:53", "url": "https://files.pythonhosted.org/packages/17/4f/c0b03dc7afece76777554dc0cf4d7d7323355b677da1454b85a40291cbc8/eea.google-4.3.zip" } ], "4.4": [ { "comment_text": "", "digests": { "md5": "58efa2d6cc210a7584220e197c663c42", "sha256": "dee039cb90760579961607723a7085c77cab3d32fa9b5ad971201c71441daa7e" }, "downloads": -1, "filename": "eea.google-4.4.zip", "has_sig": false, "md5_digest": "58efa2d6cc210a7584220e197c663c42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48824, "upload_time": "2012-07-16T11:15:01", "url": "https://files.pythonhosted.org/packages/e0/14/3358221128ce11c78adeb9c8da2aade3594e3b113dee9419ae69cce22726/eea.google-4.4.zip" } ], "4.5": [ { "comment_text": "", "digests": { "md5": "af748f39d714b0fd9424e6b30b42a442", "sha256": "eae5c10470c803aed3e7b94a6586428e3aac94c24ae0dac1e1ac419b02ae196d" }, "downloads": -1, "filename": "eea.google-4.5.zip", "has_sig": false, "md5_digest": "af748f39d714b0fd9424e6b30b42a442", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50023, "upload_time": "2013-02-05T09:41:52", "url": "https://files.pythonhosted.org/packages/6c/df/02d2d98ca7be0fc2ba21f27956c8dd6b86c990d2e3233413ab48963b39b7/eea.google-4.5.zip" } ], "4.6": [ { "comment_text": "", "digests": { "md5": "fff91c21909b358476058be30ea3b6c3", "sha256": "837fc3030009f75de165b0f8a5e76020c123c2218b8b392c49e6030892aa726a" }, "downloads": -1, "filename": "eea.google-4.6.zip", "has_sig": false, "md5_digest": "fff91c21909b358476058be30ea3b6c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50118, "upload_time": "2013-06-25T14:23:15", "url": "https://files.pythonhosted.org/packages/72/3d/57af268c98ccd751b9efea24f98666b17cd814c8e09e41fbe8b283d4b674/eea.google-4.6.zip" } ], "4.7": [ { "comment_text": "", "digests": { "md5": "57e399a2239a7e8fcf62bee55715f04f", "sha256": "2d585bf5c2cdd59fcb9d2a34a24fee4ab8d8a3ea752d1b5c7484749de9f1da9c" }, "downloads": -1, "filename": "eea.google-4.7.zip", "has_sig": false, "md5_digest": "57e399a2239a7e8fcf62bee55715f04f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50225, "upload_time": "2013-10-07T13:40:57", "url": "https://files.pythonhosted.org/packages/33/44/fd76da95e48f4a01bd2f774956c61b578107b4563ebc2d80128498340872/eea.google-4.7.zip" } ], "4.8": [ { "comment_text": "", "digests": { "md5": "6c177798e037c5441f54722f2df9f41e", "sha256": "1caaf678fd549818bddd701ec4faee18978381e3a4fb9fe88435f0e8cddecca8" }, "downloads": -1, "filename": "eea.google-4.8.zip", "has_sig": false, "md5_digest": "6c177798e037c5441f54722f2df9f41e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135040, "upload_time": "2014-01-23T09:32:04", "url": "https://files.pythonhosted.org/packages/2b/f1/e3f84250e97fa4b082d48adab47ee9d0b4a2879ee185f66c28723c5f8080/eea.google-4.8.zip" } ], "4.9": [ { "comment_text": "", "digests": { "md5": "fd792a6d7a5c3e9912695c80f3416cc4", "sha256": "748c0cfe033a5353c7142f269e862b3147ce8126d8977195fb8f753f87df97f0" }, "downloads": -1, "filename": "eea.google-4.9.zip", "has_sig": false, "md5_digest": "fd792a6d7a5c3e9912695c80f3416cc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135338, "upload_time": "2015-03-19T08:04:19", "url": "https://files.pythonhosted.org/packages/56/6b/014a2cf6099225bbe939b91245ae7eb0e64ce39f5bce74ef470d8e61ba55/eea.google-4.9.zip" } ], "5.0": [ { "comment_text": "", "digests": { "md5": "11b9688355ff9ea3d75526627333668e", "sha256": "4d5b55e0f44848207031e76c8cc461b1e1358b5bd5740bb0bf09032fa7486aa8" }, "downloads": -1, "filename": "eea.google-5.0.zip", "has_sig": false, "md5_digest": "11b9688355ff9ea3d75526627333668e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135626, "upload_time": "2015-08-31T15:05:40", "url": "https://files.pythonhosted.org/packages/1d/ca/a5aebcb362676c12251f1ca582bdf00ef470afc5194059011ba0dacb9c6b/eea.google-5.0.zip" } ], "5.1": [ { "comment_text": "", "digests": { "md5": "5ba90ce625fd41c91898507a83d7eb79", "sha256": "e6f4bc094c70dce4f15266748f9ef5142b17a55b424547adb88160b3c3e29339" }, "downloads": -1, "filename": "eea.google-5.1.zip", "has_sig": false, "md5_digest": "5ba90ce625fd41c91898507a83d7eb79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135875, "upload_time": "2015-10-08T16:59:37", "url": "https://files.pythonhosted.org/packages/a3/cc/e151e5bbe78f6f49989aa07a39ca9da011b3a11376ca39af0d658b1e6e2c/eea.google-5.1.zip" } ], "5.2": [], "5.3": [ { "comment_text": "", "digests": { "md5": "0a4979f984b4811bff483ae5f73b2cc2", "sha256": "ddf08d2f6bd86fc7a5c37a21f4501231abdeb980877da25ee4c3d9b29379a3c9" }, "downloads": -1, "filename": "eea.google-5.3.zip", "has_sig": false, "md5_digest": "0a4979f984b4811bff483ae5f73b2cc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 146922, "upload_time": "2017-05-02T08:13:10", "url": "https://files.pythonhosted.org/packages/2c/ba/abe2ab59fad50902fab91e3bc41b60deed9a751262084c9a52d9450092e6/eea.google-5.3.zip" } ], "5.4": [ { "comment_text": "", "digests": { "md5": "9f37966a3df87cdae28e8487f9ea1451", "sha256": "60c096cd206cb0dce4a5bcda90ab6b13ff1a8de1c6ce1787e9c47488cb8f6608" }, "downloads": -1, "filename": "eea.google-5.4.zip", "has_sig": false, "md5_digest": "9f37966a3df87cdae28e8487f9ea1451", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147025, "upload_time": "2017-05-22T13:32:19", "url": "https://files.pythonhosted.org/packages/42/b6/d7aec5695bf04a3c10bd74950c4a439b86b466445d974d843d67bdf5cb44/eea.google-5.4.zip" } ], "5.5": [ { "comment_text": "", "digests": { "md5": "d0a7160e2971ac3d1657f06b28f63e45", "sha256": "f88526a148af330bf04ae95c2dc90f91f1b4a036b80f2fca429aae98c36cec93" }, "downloads": -1, "filename": "eea.google-5.5.zip", "has_sig": false, "md5_digest": "d0a7160e2971ac3d1657f06b28f63e45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147062, "upload_time": "2017-05-22T14:45:35", "url": "https://files.pythonhosted.org/packages/fd/6f/e8f1de3113c2ca4cfb1e05e2d848396d9fbcec6ae6675df0d3a57115fd8b/eea.google-5.5.zip" } ], "5.6": [ { "comment_text": "", "digests": { "md5": "3c03a3c8cb09f0cdd268de230730bb7d", "sha256": "ad72750b06899d65d58b0774c81b43f1820c91c001b0efd003ae171bf31bb626" }, "downloads": -1, "filename": "eea.google-5.6.zip", "has_sig": false, "md5_digest": "3c03a3c8cb09f0cdd268de230730bb7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53292, "upload_time": "2017-11-08T13:06:05", "url": "https://files.pythonhosted.org/packages/52/6c/37366e9878b9a7d80ed8b2712e1a291493182c43d1a3300b3e867c5b45cf/eea.google-5.6.zip" } ], "5.7": [ { "comment_text": "", "digests": { "md5": "e406b59e450008253c9d4b1667007045", "sha256": "91c30d7876cee85824ebdc8a9099abd9e4ea347acc9dc168da50249f9c57e7b8" }, "downloads": -1, "filename": "eea.google-5.7.zip", "has_sig": false, "md5_digest": "e406b59e450008253c9d4b1667007045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53414, "upload_time": "2018-02-23T16:25:55", "url": "https://files.pythonhosted.org/packages/e6/43/c83f1d5dc4909ed8d8b59123b97c876a78a34536f39ab6d5670ecbae5470/eea.google-5.7.zip" } ], "5.8": [ { "comment_text": "", "digests": { "md5": "544e90cc18b71b6e44c5febc04a22fe9", "sha256": "e795fa841a23fa9f859b2fccf3feda28e9ce47e54ab61dc1ef67e6613eb2ba97" }, "downloads": -1, "filename": "eea.google-5.8.zip", "has_sig": false, "md5_digest": "544e90cc18b71b6e44c5febc04a22fe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54692, "upload_time": "2019-01-29T17:38:53", "url": "https://files.pythonhosted.org/packages/3d/4a/a6780323970d18fc2603d2e90634beed88c839595d72d6e61f9d67b88e6f/eea.google-5.8.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "544e90cc18b71b6e44c5febc04a22fe9", "sha256": "e795fa841a23fa9f859b2fccf3feda28e9ce47e54ab61dc1ef67e6613eb2ba97" }, "downloads": -1, "filename": "eea.google-5.8.zip", "has_sig": false, "md5_digest": "544e90cc18b71b6e44c5febc04a22fe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54692, "upload_time": "2019-01-29T17:38:53", "url": "https://files.pythonhosted.org/packages/3d/4a/a6780323970d18fc2603d2e90634beed88c839595d72d6e61f9d67b88e6f/eea.google-5.8.zip" } ] }