{ "info": { "author": "See Contributors", "author_email": "napalm255@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Help on module geckoboard:\n\nNAME\n geckoboard - Geckoboard API Interface (Unofficial).\n\nFILE\n geckoboard/geckoboard.py\n\nDESCRIPTION\n This module/class is designed to work with the Geckoboard API.\n \n Geckoboard can be found here:\n https://www.geckoboard.com/\n \n Geckoboard API documentation can be found here:\n https://developer.geckoboard.com/#introduction\n \n Examples:\n >>> import os\n >>> from geckoboard import Gecko\n >>> gecko = Gecko(os.environ['GECKOAPI'])\n\nCLASSES\n __builtin__.object\n Gecko\n \n class Gecko(__builtin__.object)\n | Geckoboard API Interface.\n | \n | Attributes:\n | api_key (str): Geckoboard API Key.\n | url (str): Geckoboard API Url.\n | \n | Methods defined here:\n | \n | __init__(self, api_key)\n | Initialize Gecko object.\n | \n | Args:\n | api_key (str): Geckoboard API Key.\n | \n | leaderboard(self, widget_key, items, **kwargs)\n | Push to leaderboard widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | items (List[list]): Series of data to publish to the leaderboard\n | **kwargs: Additional parameters.\n | format (str): Optional possible values are \"decimal\", \"percent\"\n | and \"currency\". The default is \"decimal\".\n | unit (str): Optional When the format is currency this must be\n | an ISO 4217 currency code. E.g. \"GBP\", \"USD\", \"EUR\".\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key='186285-0ba9cd63-efd0-4a9e-b37a-8ba0cf27694c'\n | \n | >>> gecko.leaderboard(widget_key, [['Peter', 234.4], ['Patrick', 232]])\n | \n | \n | >>> gecko.leaderboard(widget_key, [['Peter', 234.4, 2], ['Patrick', 232, 1]])\n | \n | \n | >>> gecko.leaderboard(widget_key, [['Peter', 34], ['Patrick', 32]], format='percent')\n | \n | \n | >>> gecko.leaderboard(widget_key, [['Peter', 34.4, 2], ['Patrick', 32, 1]], format='currency', unit='usd')\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | line(self, widget_key, series, **kwargs)\n | Push to line graph widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | series (List[dict]): Series of data to publish to the widget.\n | **kwargs: Additional parameters.\n | type (str): Set x-axis type. Defaults to 'standard'.\n | Specifying the string \"datetime\" will cause all X axis\n | values to be interpreted as an ISO 8601 date/time.\n | Partial dates (e.g. 2014-10 for October 2014) are\n | supported. See below for details on how datetimes are\n | rendered on the chart. Leaving type empty or setting\n | it to standard will cause X values to be interpreted\n | the usual way.\n | format (str): Set y-axis format. Defaults to 'decimal'.\n | If given, this string will represent the format of\n | the Y axis and will be displayed accordingly.\n | Possible values are \"decimal\", \"percent\" and \"currency\".\n | unit (str): Set y-axis unit type for the 'currency' format.\n | Defaults to 'USD'.\n | When the format is currency this must be\n | an ISO 4217 currency code. E.g. \"GBP\", \"USD\", \"EUR\"\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-4b472381-cf47-422e-9e6a-e03fee123ae7'\n | \n | >>> gecko.line(widget_key, [{'name': 'Brad', 'data': [1, 2, 3, 4]}, {'name': 'Rich', 'data': [4, 3, 2, 1]}, {'name': 'Bob', 'data': [1, 3, 2, 4]}])\n | \n | \n | >>> gecko.line(widget_key, [{'name': 'Brad', 'data': [1, 2, 3, 4]}, {'name': 'Rich', 'data': [4, 3, 2, 1]}], type='secondary')\n | \n | \n | >>> gecko.line(widget_key, [{'name': 'Brad', 'data': [1, 2, 3, 4]}, {'name': 'Rich', 'data': [4, 3, 2, 1]}, {'name': 'Bob', 'data': [1, 3, 2, 4]}], x_axis=['2016-01', '2016-02', '2016-03', '2016-04'])\n | \n | \n | >>> gecko.line(widget_key, [{'name': 'Brad', 'data': [1, 2, 3, 4]}, {'name': 'Rich', 'data': [4, 3, 2, 1]}, {'name': 'Bob', 'data': [1, 3, 2, 4]}], x_axis=['2016-01', '2016-02', '2016-03', '2016-04'], format='currency', unit='USD')\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | meter(self, widget_key, value, min_value=0, max_value=100)\n | Push to gecko-o-meter widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | value (int): Primary value of the widget.\n | min_value (int): Minimum value for the widget scale.\n | Defaults to 0\n | max_value (int): Maximum value for the widget scale.\n | Defaults to 100\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-cf4afbf9-e70f-40f6-a965-ed9817cea428'\n | \n | >>> gecko.meter(widget_key, 69)\n | \n | \n | >>> gecko.meter(widget_key, 690, 0, 1000)\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | number(self, widget_key, value1, value2=None, **kwargs)\n | Push to number widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | value1 (int): number to publish to Geckoboard.\n | value2 (int|list): number or trendline to publish to Geckoboard.\n | An (int) is used for comparison to value1.\n | A (list) is used to plot a trendline.\n | **kwargs: Additional parameters.\n | text (str): Label to appear after the primary value.\n | prefix (str): Label to appear before the primary value.\n | absolute (bool): Comparison using absolute values.\n | Defaults to False.\n | If True, use absolute values for comparison.\n | If False, use percentages for comparison\n | reverse (bool): Reverse comparison. Defaults to False.\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-86ab59ff-5662-4867-a8ff-0d88a3efc966'\n | \n | >>> gecko.number(widget_key, 100)\n | \n | \n | >>> gecko.number(widget_key, 100, 200)\n | \n | \n | >>> gecko.number(widget_key, 100, [10, 5, 15, 8], text='Million', prefix='$')\n | \n | \n | >>> gecko.number(widget_key, 100, 200, absolute=True)\n | \n | \n | >>> gecko.number(widget_key, 100, 200, absolute=True, reverse=True)\n | \n | \n | >>> gecko.number(widget_key, 100, 200, text='Million', prefix='$')\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | pie(self, widget_key, items, color='')\n | Push to pie graph widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | items (List[dict]): Items to push to the widget.\n | color (str): Pie slice color for all items.\n | Defaults to ''.\n | May be overridden per item, via the items input.\n | Must be valid hex color codes like 'c0c0c0'.\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-125dc97d-dfa0-488b-a3ba-9c98a2549e8b'\n | \n | >>> gecko.pie(widget_key, [{'Brad': 255}, {'Rich': 1050}, {'Bob': 187}])\n | \n | \n | >>> gecko.pie(widget_key, [{'Brad': {'value': 255, 'color': 'ff0000'}}, {'Rich': {'value': 1050, 'color': '0000ff'}}, {'Bob': {'value': 187, 'color': '00ff00'}}])\n | \n | \n | >>> gecko.pie(widget_key, [{'Brad': {'value': 255, 'color': 'ff0000'}}, {'Rich': {'value': 1050, 'color': '0000ff'}}, {'Bob': 187}], color='c0c0c0')\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | push(self, widget_key, data)\n | Push data to Geckoboard.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | data (dict): Data to post to Geckoboard.\n | Should be in the form of:\n | {'item': []}\n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | rag(self, widget_key, items, prefix='', reverse=False)\n | Push to RAG (Red Amber Green) visualization widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | items (List[dict]): Items to push to the widget.\n | prefix (str): Prefix to append to all items.\n | Defaults to ''.\n | May be overridden per item, via the items input.\n | Percent symbol (%) is treated as a suffix.\n | reverse (bool): Reverse the list order. Defaults to False.\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-649213c7-c5ac-4d58-a3e5-6d9066aee288'\n | \n | >>> gecko.rag(widget_key, [{'Brad': 255}, {'Rich': 1050}, {'Bob': 187}])\n | \n | \n | >>> gecko.rag(widget_key, [{'Brad': 255}, {'Rich': 1050}, {'Bob': 187}], prefix='$')\n | \n | \n | >>> gecko.rag(widget_key, [{'Brad': 255}, {'Rich': 1050}, {'Bob': 187}], prefix='%')\n | \n | \n | >>> gecko.rag(widget_key, [{'Brad': {'value': 255, 'prefix': '%'}}, {'Rich': {'value': 1050, 'prefix': '%'}}, {'Bob': 187}])\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | text(self, widget_key, *texts, **kwargs)\n | Push to text widget.\n | \n | Args:\n | widget_key (str): Unique Geckoboard widget key.\n | *texts (str|dict): Text to publish to the widget.\n | Each argument is published as an additional page on the widget.\n | **kwargs: Additional parameters.\n | flag (str): Add extra visual clue to each page of the widget.\n | Defaults to 'none'.\n | When it's not given or set to 'none' (0), no icon will be\n | added. When type is set to 'alert' (1) an exclamation point\n | on yellow background will appear in the top right corner.\n | When type is set to 'info' (2), an 'i' icon on grey\n | background will be displayed in the top right corner.\n | \n | Examples:\n | >>> import os\n | >>> from geckoboard import Gecko\n | >>> gecko = Gecko(os.environ['GECKOAPI'])\n | >>> widget_key = '186285-adaf4a5a-dd89-4356-8f43-75bfaf6b9576'\n | \n | >>> gecko.text(widget_key, 'Hello World!')\n | \n | \n | >>> gecko.text(widget_key, 'Hello', 'World!')\n | \n | \n | >>> gecko.text(widget_key, 'Hello', 'World!', flag='alert')\n | \n | \n | >>> gecko.text(widget_key, {'text': 'Hello', 'type': 0}, {'text': 'World', 'type': 1})\n | \n | \n | Returns:\n | None or object: None if error, requests.response if successful.\n | \n | ----------------------------------------------------------------------\n | Data descriptors defined here:\n | \n | __dict__\n | dictionary for instance variables (if defined)\n | \n | __weakref__\n | list of weak references to the object (if defined)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/geckoboard/", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "geckoboard", "package_url": "https://pypi.org/project/geckoboard/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geckoboard/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/geckoboard/" }, "release_url": "https://pypi.org/project/geckoboard/0.8.6/", "requires_dist": null, "requires_python": "", "summary": "Geckoboard API Interface (Unofficial)", "version": "0.8.6" }, "last_serial": 2124741, "releases": { "0.8.6": [ { "comment_text": "", "digests": { "md5": "d64766e92632dd10c6cd42c12905af35", "sha256": "f31c43ad4bb99bd9bd18da77b6d570245ee29667584a2bce56e6517895d66261" }, "downloads": -1, "filename": "geckoboard-0.8.6.tar.gz", "has_sig": false, "md5_digest": "d64766e92632dd10c6cd42c12905af35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12166, "upload_time": "2016-05-19T23:13:32", "url": "https://files.pythonhosted.org/packages/dc/fe/5f368eb3271398c2c0fb1ec264fbc899377d2bd4ee8059b832b58a48907f/geckoboard-0.8.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d64766e92632dd10c6cd42c12905af35", "sha256": "f31c43ad4bb99bd9bd18da77b6d570245ee29667584a2bce56e6517895d66261" }, "downloads": -1, "filename": "geckoboard-0.8.6.tar.gz", "has_sig": false, "md5_digest": "d64766e92632dd10c6cd42c12905af35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12166, "upload_time": "2016-05-19T23:13:32", "url": "https://files.pythonhosted.org/packages/dc/fe/5f368eb3271398c2c0fb1ec264fbc899377d2bd4ee8059b832b58a48907f/geckoboard-0.8.6.tar.gz" } ] }