{ "info": { "author": "Jacob Kaplan-Moss", "author_email": "jacob@jaobian.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet" ], "description": "Python Timetric client\n======================\n\nA client for Timetric (http://timetric.com).\n\nRequirements (easy-installable, listed as prereqs in setup.py):\n\n * httplib2\n * python-dateutil\n * simplejson\n\nOptionally, if you want to use OAuth authentication:\n\n * oauth\n\nThis is *not* listed as a prereq, so it won't be installed by default.\n\nAuthentication setup\n--------------------\n\nYou'll provide authentication information to the ``TimetricClient`` in a config\ndict. Timetric supports two types of authentication: OAuth and API tokens. You\ncan choose a method using the ``'authtype'`` key to the config dict. The value\nof this key can be ``'oauth'`` or ``'apitoken'``; if not given it defaults to\n``'oauth'``.\n\nIf an API token is being used, there must be keys for:\n\n * 'apitoken_key'\n * 'apitoken_secret'\n\nIf OAuth is being used, there must also be keys for:\n\n * 'consumer_key'\n * 'consumer_secret'\n\nand if you have already done the necessary key exchange, then this can also\ncontain:\n\n * 'access_key'\n * 'access_token'\n\nOAuth setup\n-----------\n\nThe first time you use the OAuth protocol, you'll need to do some key exchange\nwith Timetric to set up your tokens.\n\n >>> import timetric\n\n # You need a config dict with at minimum your secret and key from Timetric\n # (see the \"Applications\" pane of the settings page). In a real app you'll\n # want to make this config persistant (the shelve module is a lightweight\n # place to start) because the library will store OAuth authentication\n # information back to this config.\n >>> conf = {'authtype':'oauth', \n ... 'consumer_key: 'XXX',\n ... 'consumer_secret': 'XXX'}\n >>> client = timetric.TimetricClient(conf)\n\n # The first time through you'll need to authorize your key with Timetric\n # by sending the user to an authorization request page.\n >> token = client.get_request_token()\n >>> import webbrowser\n >>> webbrowser.open(client.get_authorize_url(token))\n\n # Once the user has authorized at that page, you can continue.\n >>> access_token = client.get_access_token(token)\n\n # You can now re-authorize to use this token:\n >>> conf.update({'oauth_key':access_token.key,\n ... 'oauth_secret':access_token.secret})\n >>> client = timetric.TimetricClient(conf)\n\nAPI token setup\n---------------\n\n >>> import timetric\n\n # Having got your config dict from somewhere:\n >>> conf = {'authtype':'apitoken', \n ... 'apitoken_key': 'XXX', \n .. 'apitoken-secret': 'XXX'}\n\n # you initialize the timetric client:\n >>> client = timetric.TimetricClient(conf)\n\n\nUsage\n-----\n\n::\n \n # There's no API method to get a list of a particular\n # user's series, so you need to somehow \"know\" the series ID.\n >>> series = client.series('p-DpewL0TO-iBE4nMBCTsQ')\n \n # Get the latest value\n >>> series.latest()\n (1236707269.0, 2.0)\n \n # Iterate over the whole dataset\n >>> for (timestamp, value) in series:\n ... print timestamp, value\n 1236463646.39 3.0 \n 1236486562.94 5.0 \n 1236493503.37 6.0\n \n # Update given a single value\n >>> series.update(14)\n \n # Update given an iterable of (time, value) pairs\n >>> import time\n >>> data = [(time.time() - 100, 11), (time.time() + 100, 15)]\n >>> series.update(data)\n \n # Update given a file of CSV data\n >>> series.update(open('/tmp/data.csv'))\n \n # Clear all the data out of the series\n >>> series.delete()", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jacobian/timetric", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "timetric", "package_url": "https://pypi.org/project/timetric/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/timetric/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/jacobian/timetric" }, "release_url": "https://pypi.org/project/timetric/1.3/", "requires_dist": null, "requires_python": null, "summary": "Client library for Timetric (http://timetric.com/)", "version": "1.3" }, "last_serial": 640052, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8c097f4ece0ee01b7f41f1ccd19609ec", "sha256": "84e504dabb84e92a1fef6357fa77b3629398e7bc9f39ea65ee1cdb3b4caca642" }, "downloads": -1, "filename": "timetric-1.0.tar.gz", "has_sig": false, "md5_digest": "8c097f4ece0ee01b7f41f1ccd19609ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6673, "upload_time": "2009-03-11T03:36:35", "url": "https://files.pythonhosted.org/packages/df/88/13467bbb522f9a141edc9ea46310a56e3ecd1450face429832d48706f50a/timetric-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "e9afe1468c08b3c5d5817495e1b21ab1", "sha256": "a38b08e09bc8a05f3a22d20947c70fd22f295b6e859a1bc0562001ab552e7e32" }, "downloads": -1, "filename": "timetric-1.1.tar.gz", "has_sig": false, "md5_digest": "e9afe1468c08b3c5d5817495e1b21ab1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6455, "upload_time": "2009-03-12T16:52:11", "url": "https://files.pythonhosted.org/packages/96/c2/262896a88bf595042e26f357d757645bf41e61e3d390002b15d097d20bba/timetric-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "8b2f1a0f492df58b91882d13c899147e", "sha256": "8e929661914a9579cc907a2024274dfdd0ca83fe698ab5f6a23ceeb93750d5e1" }, "downloads": -1, "filename": "timetric-1.2.tar.gz", "has_sig": false, "md5_digest": "8b2f1a0f492df58b91882d13c899147e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6749, "upload_time": "2009-05-07T19:46:16", "url": "https://files.pythonhosted.org/packages/98/cb/790d591e10a0bfcdeea01214c02dea7da6f7c443387dbf90613e733a1d08/timetric-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "d09c3a5b14d4962eaac60a136b6b3765", "sha256": "52aff270fa4177c6e3860eebfe1328c30182a641391108252ab36290808aa6f4" }, "downloads": -1, "filename": "timetric-1.3.tar.gz", "has_sig": false, "md5_digest": "d09c3a5b14d4962eaac60a136b6b3765", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7766, "upload_time": "2009-06-11T17:51:17", "url": "https://files.pythonhosted.org/packages/e4/bd/a833511bffa32e14f5291e33cf50778ce5468225cc5b7fe249180d1ebcd4/timetric-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d09c3a5b14d4962eaac60a136b6b3765", "sha256": "52aff270fa4177c6e3860eebfe1328c30182a641391108252ab36290808aa6f4" }, "downloads": -1, "filename": "timetric-1.3.tar.gz", "has_sig": false, "md5_digest": "d09c3a5b14d4962eaac60a136b6b3765", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7766, "upload_time": "2009-06-11T17:51:17", "url": "https://files.pythonhosted.org/packages/e4/bd/a833511bffa32e14f5291e33cf50778ce5468225cc5b7fe249180d1ebcd4/timetric-1.3.tar.gz" } ] }