{ "info": { "author": "Alvaro Leiva", "author_email": "aleivag@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: System :: Monitoring", "Topic :: Utilities" ], "description": "=======\npyngdom\n=======\n\nSimple python API Against Pingdom, that feature RUM extraction.\n\n.. image:: https://travis-ci.org/Epi10/pyngdom.svg?branch=master\n :target: https://travis-ci.org/Epi10/pyngdom\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/Epi10/pyngdom\n :target: https://gitter.im/Epi10/pyngdom?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. image:: https://img.shields.io/pypi/dm/pyngdom.svg?style=flat-square&label=PyPI%20Downloads\n :target: https://pypi.python.org/pypi/pyngdom/\n :alt: Downloads\n\nComents\n-------\n\nPlease feel free to levae a coment (if instalation fail, or something is not working) on gitter at https://gitter.im/Epi10/pyngdom\nor send me a email at aleivag@gmail.com\n\nInstall\n-------\n\nAs usual\n\n.. code:: bash\n \n python setup.py install\n\n\nOr as less ussual\n\n.. code:: bash\n\n pip install pyngdom\n\nOr as less less usual\n\n.. code:: bash\n \n pip install git+https://github.com/Epi10/pyngdom\n\n\nGetting Rum\n-----------\n\nIf you are here is for the RUM (and that's not a bad pirate's pun).\n\nWe provide with 2 interfaces to pingdom rum, the first one its using a python-only aproach, and that will give you only\n*today's* RUM information, that's good if you don't want to install extra dependencies or dont like/want selenium. for the second\napproach you'll need selenium and a webbrowser, for testing, Firefox is fine, but if you really wnat to take advantage of the script\nyou should really use PhantomJS (the default).\n\nExamples will be placed in the example folder, and you can use the at will. i really recomend check the git repository\nto get the latest examples.\n\nPython-Only method\n^^^^^^^^^^^^^^^^^^\n\nDisclaimer, the RUM search is not part of the pingdom API, and its not supported by pingdom, so it can stop working at any time,\nuse under your own risk. Also this method is harder to maintain than the selenium approach, so will take longer to fix if pingdom change anything.\n\nSo how it is use:\n\n\n.. code:: python\n\n from pyngdom import PyngdomRum\n \n pingdom = Pyngdom(\n username='user@epi10.cl',\n password='super-secret-password',\n apikey='6dz4mqdms0qaxrjstntf6myt6wz5vseg',\n account='owner@epi10.cl'\n )\n pingdom.login()\n\n\nNow you need to know the rum test ID, that's easy all you need to do is login into pingdom and then look for the RUM link\nin the reports page, the format of the rum link is https://my.pingdom.com/rum/XXXXXXXXXXX\n\nhere is a example\n\n.. image:: https://raw.githubusercontent.com/Epi10/pyngdom/master/docs/rumid.png\n :alt: RumID search\n\nafter you got the link all you need to do is\n\n.. code:: python\n\n >>> rum = pingdom.today_rum('XXXXXXXXXXX')\n >>> print rum\n {\n u'allow_subdomains': False,\n u'total': {u'average': 2557,\n u'count': 40305,\n u'median': 1971.4791994493,\n u'p90': 4623.1101804124,\n u'p95': 5853.3586753731,\n u'p99': 10089.605}\n ....\n ....\n 'url': 'http://epi10.cl'\n }\n \n \n #Get Total RUM\n >> print rum['total']\n {\n u'average': 2557,\n u'count': 40305,\n u'median': 1971.4791994493,\n u'p90': 4623.1101804124,\n u'p95': 5853.3586753731,\n u'p99': 10089.605\n }\n \n \n \n #Get RUM per geolocation that exist\n >> print rum['geo'].get('us', {})\n {\n u'average': 6657,\n u'count': 27,\n u'median': 5875.0625,\n u'p90': 9700.0416666667,\n u'p95': 10175.125,\n u'p99': 13435.125\n }\n \n # Get geographic zone (remember not all geographic zone exists)\n >> print rum['geo'].get('jp', {})\n {}\n\n\n\nAlso there is lots and lots of available information.\n\nIf you have selenium (and you should), use it.\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you have selenium (and even better PhantomJS [http://phantomjs.org/]) you should use it.\nThis will open a new door to get RealTime RUM and its easy to implement and expand the\nPyndomDriver than the normal rum, from the user point of view, both methods should be\ninterchangeable, but this will actually give you realtime RUM.\n\n\nHow do i use it?\n\nFirst install selenium\n\n\n.. code:: bash\n\n pip install selenium\n\n\nNow you are ready to use it\n\n.. code:: python\n\n from pyngdom import PyngdomDriver\n\n # If you want to use your native firefox (no extra install other than having your own firefox)\n\n pingdom = PyngdomDriver(\n username='user@epi10.cl',\n password='super-secret-password',\n base_driver='Firefox'\n )\n\n #if you have phantomjs installed\n\n pingdom = PyngdomDriver(\n username='user@epi10.cl',\n password='super-secret-password'\n )\n\n #then login\n pingdom.login()\n\n\n\n\nthen its simple, you just get the checkid of your rum (see previous section) and then call it the same\n\n\n.. code:: python\n\n >>> rum = pingdom.today_rum('XXXXXXXXXXX')\n {\n u'allow_subdomains': False,\n u'total': {u'average': 2557,\n u'count': 40305,\n u'median': 1971.4791994493,\n u'p90': 4623.1101804124,\n u'p95': 5853.3586753731,\n u'p99': 10089.605}\n ....\n ....\n 'url': 'http://epi10.cl'\n }\n\n\nAnd now the fun part, to get the realtime rum you just pick a sample interval (i.e. 30 seconds) and then you just\n\n\n.. code:: python\n\n >>> rum = pingdom.realtime_rum('XXXXXXXXXXX', 30)\n #30 seconds later\n\n {\n u'allow_subdomains': False,\n u'total': {u'average': 2456,\n u'count': 15,\n u'median': 1971.4791994493,\n u'p90': 4623.1101804124,\n u'p95': 5853.3586753731,\n u'p99': 10089.605}\n ....\n ....\n 'url': 'http://epi10.cl'\n }\n\nyou can use with statements\n\n.. code:: python\n\n with PyngdomDriver(username='user@epi10.cl', password='super-secret-password') as pingdom:\n realtime = pingdom.realtime_rum('XXXXXXXXXXX', 30)\n\nAnd its just that simple... once again we strongly suggest using phantomjs, installit is so simple in linux and mac.\n\n\nExtra API\n---------\n\nIf you need the standard pingom API, i recommend using https://pypi.python.org/pypi/PingdomLib , its mature and it is\nreally simple to use. Never the less we include some extra functionality, using the standard pingdom API, only here\nbecause for some projects we really need them.\n\n\n.. code:: python\n\n from pprint import pprint\n\n from pyngdom import Pyngdom\n\n pingdom = Pyngdom(\n username='user@epi10.cl',\n password='super-secret-password',\n apikey='6dz4mqdms0qaxrjstntf6myt6wz5vseg',\n account='owner@epi10.cl'\n )\n\n check_list = pingdom.get_check_list()\n\n #print the check lists\n pprint(check_list)\n\n #get only the check for api.epi10.cl\n api_epi10_check = filter(lambda x: x.get('hostname') == 'api.epi10.cl', check_list.get('checks', []))[0]\n\n #print detailed information\n print pingdom.get_detailed_check_information(api_epi10_check['id'])\n\n\nand that how easy would you use it.\n\nChangelog\n---------\n\n\n0.1.2 2014-06-04\n^^^^^^^^^^^^^^^^\n* Fix (stupid) pypi error at install (we read the README.rst in setup.py, but we never include when we python setup.py sdist).\n\n\n0.1.1 2014-06-04\n^^^^^^^^^^^^^^^^\n* Fix Documentation to include login.\n* Add example folders.\n\n\n0.1.0 2014-06-03\n^^^^^^^^^^^^^^^^\n* initial commit", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Epi10/pyngdom/releases/tag/0.1.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Epi10/pyngdom", "keywords": "monitoring,rum,pingdom", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyngdom", "package_url": "https://pypi.org/project/pyngdom/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyngdom/", "project_urls": { "Download": "https://github.com/Epi10/pyngdom/releases/tag/0.1.2", "Homepage": "https://github.com/Epi10/pyngdom" }, "release_url": "https://pypi.org/project/pyngdom/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A simple pingdom API interface for read RUM information", "version": "0.1.2" }, "last_serial": 1581244, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d145202e9df5afbf7bf7c92f21c1ec3f", "sha256": "61b1e6d5843f6f13cb9d5a351d7bbbfa09daa2e4634ccadfd01f7a0ae486e57d" }, "downloads": -1, "filename": "pyngdom-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d145202e9df5afbf7bf7c92f21c1ec3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5141, "upload_time": "2015-06-05T01:38:30", "url": "https://files.pythonhosted.org/packages/c5/ed/f51f21ebdbf39fe08dc449252a709f2ab940496eb00f125fcbba7bd0fc3b/pyngdom-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ef57b1ed7b46268926449e2a6f24eafc", "sha256": "980016e966e8d86db85b3bc0474bb4543f6677f67f6c0e8511daeeda210b7c8e" }, "downloads": -1, "filename": "pyngdom-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef57b1ed7b46268926449e2a6f24eafc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5476, "upload_time": "2015-06-05T12:18:38", "url": "https://files.pythonhosted.org/packages/72/ec/5d77a1e15b4d8eb970870622ac3c8c351c28d2cec64d2ce94900a26e32ba/pyngdom-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b2dcf19f14e76762394794395ca39fc1", "sha256": "58a10d3cf73c718aed775585133d120e9fb10008d2cf87f7fc500e691580b924" }, "downloads": -1, "filename": "pyngdom-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b2dcf19f14e76762394794395ca39fc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5641, "upload_time": "2015-06-06T20:53:21", "url": "https://files.pythonhosted.org/packages/23/9c/bf71e115255fd2e6f0fd58e9ed850c3eab7425405f4944dcb39ea473b382/pyngdom-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b2dcf19f14e76762394794395ca39fc1", "sha256": "58a10d3cf73c718aed775585133d120e9fb10008d2cf87f7fc500e691580b924" }, "downloads": -1, "filename": "pyngdom-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b2dcf19f14e76762394794395ca39fc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5641, "upload_time": "2015-06-06T20:53:21", "url": "https://files.pythonhosted.org/packages/23/9c/bf71e115255fd2e6f0fd58e9ed850c3eab7425405f4944dcb39ea473b382/pyngdom-0.1.2.tar.gz" } ] }