{ "info": { "author": "Stijn Debrouwere", "author_email": "stijn@stdout.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "# python-omniture\n\n`python-omniture` is a wrapper around the Adobe Omniture web analytics API.\n\nIt is not meant to be comprehensive. Instead, it provides a high-level interface\nto certain common kinds of queries, and allows you to do construct other queries\ncloser to the metal.\n\n## Installation\n\nThrough PyPI:\n\n pip install omniture\n\nLatest and greatest: \n\n pip install git+git://github.com/stdbrouw/python-omniture.git\n\n## Authentication\n\nThe most straightforward way to authenticate is with: \n\n import omniture\n account = omniture.authenticate('my_username', 'my_secret')\n\nHowever, to avoid hardcoding passwords, instead you can also put your username\nand password in unix environment variables (e.g. in your `.bashrc`):\n\n export OMNITURE_USERNAME=my_username\n export OMNITURE_SECRET=my_secret\n\nWith your credentials in the environment, you can then log in as follows:\n\n import os\n import omniture\n account = omniture.authenticate(os.environ)\n\n## Account and suites\n\nYou can very easily access some basic information about your account and your\nreporting suites:\n\n print analytics.suites\n suite = analytics.suites['guardiangu-network']\n print suite\n print len(suite.evars)\n print suite.segments\n print suite.elements\n\nYou can refer to suites, segments, elements and so on using both their\nhuman-readable name or their id. So for example `suite.segments['pageviews']` and `suite.segments['Page Views']` will work exactly the same. This is especially useful in cases when segment or metric identifiers are long strings of gibberish. That way you don't have to riddle your code with references to `evar16` or `custom4` and instead can call them by their title.\n\n## Running a report\n\n`python-omniture` can run ranked, trended and \"over time\" reports\n\nHere's a quick example: \n\n report = network.report \\\n .over_time(metrics=['pageviews', 'visitors']) \\\n .range('2013-05-01', '2013-05-31', granularity='month') \\\n .sync()\n\nSome basic features of the three kinds of reports you can run: \n\n* over_time\n * supports multiple metrics but only one element: time\n * useful if you need information on a per-page basis\n * supports hourly reporting (and up)\n* ranked\n * ranks pages in relation to the metric\n * one number (per metric) for the entire reporting period\n * only supports daily, weekly and monthly reporting\n* trended\n * movement of a single element and metric over time (e.g. visits to world news over time)\n * supports hourly reporting (and up)\n\nAccessing the data in a report works as follows:\n\n report.data['pageviews']\n\n### Getting down to the plumbing.\n\nThis module is still in beta and you should expect some things not to work. In particular, trended reports have not seen much love (though they should work), and data warehouse reports don't work at all.\n\nIn these cases, it can be useful to use the lower-level access this module provides through `mysuite.report.set` -- you can pass set either a key and value, a dictionary with key-value pairs or you can pass keyword arguments. These will then be added to the raw query. You can always check what the raw query is going to be with the `build` method on queries.\n\n query = network.report \\\n .over_time(metrics=['pageviews', 'visitors']) \\\n .set(dateGranularity='month')\n .set({'segmentId': 'social'})\n .set('name', 'my report name')\n\n print query.build()\n\n### Running multiple reports\n\nIf you're interested in automating a large number of reports, you can speed up the \nexecution by first queueing all the reports and only _then_ waiting on the results.\n\nHere's an example:\n\n queue = []\n for segment in segments:\n report = network.report \\\n .range('2013-05-01', '2013-05-31', granularity='day') \\\n .over_time(metrics=['pageviews']) \\\n .filter(segment=segment)\n queue.append(report)\n\n heartbeat = lambda: sys.stdout.write('.')\n reports = omniture.sync(queue, heartbeat)\n\n for report in reports:\n print report.segment\n print report.data['pageviews']\n\n`omniture.sync` can queue up (and synchronize) both a list of reports, or a dictionary.", "description_content_type": null, "docs_url": null, "download_url": "http://www.github.com/stdbrouw/python-omniture/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://stdbrouw.github.com/python-omniture/", "keywords": "data analytics api wrapper adobe", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "omniture", "package_url": "https://pypi.org/project/omniture/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/omniture/", "project_urls": { "Download": "http://www.github.com/stdbrouw/python-omniture/tarball/master", "Homepage": "http://stdbrouw.github.com/python-omniture/" }, "release_url": "https://pypi.org/project/omniture/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "A wrapper for the Adobe Omniture and SiteCatalyst web analytics API.", "version": "0.3.1" }, "last_serial": 873794, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "75275699e99d89487593bce741ccc04f", "sha256": "a348b75c01a9b8531d8a824b2d49758cc866d97d29eb54ffedb4f42924fcc833" }, "downloads": -1, "filename": "omniture-0.3.0.tar.gz", "has_sig": false, "md5_digest": "75275699e99d89487593bce741ccc04f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8580, "upload_time": "2013-09-25T13:09:27", "url": "https://files.pythonhosted.org/packages/8f/fa/5037283419b61fec31815a1a4627c4e4761a0ef703db0243e3c3b4830bbb/omniture-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "5f6a83264a75fe7cd0541f32cf58453d", "sha256": "659584586b2a86cb4b8751e3208ad08de93ba344bb53459ac56f9994926cadaf" }, "downloads": -1, "filename": "omniture-0.3.1.tar.gz", "has_sig": false, "md5_digest": "5f6a83264a75fe7cd0541f32cf58453d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8620, "upload_time": "2013-09-25T14:59:00", "url": "https://files.pythonhosted.org/packages/b8/4b/e8524d8dd20b55a13d49c5b2b4d6d791c32300cc4c36fca076a87a4bd86d/omniture-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f6a83264a75fe7cd0541f32cf58453d", "sha256": "659584586b2a86cb4b8751e3208ad08de93ba344bb53459ac56f9994926cadaf" }, "downloads": -1, "filename": "omniture-0.3.1.tar.gz", "has_sig": false, "md5_digest": "5f6a83264a75fe7cd0541f32cf58453d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8620, "upload_time": "2013-09-25T14:59:00", "url": "https://files.pythonhosted.org/packages/b8/4b/e8524d8dd20b55a13d49c5b2b4d6d791c32300cc4c36fca076a87a4bd86d/omniture-0.3.1.tar.gz" } ] }