{ "info": { "author": "Alex Maslakov", "author_email": "Alex Maslakov, Alex Maslakov", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "Harvest API client\n===================================\n\nA Python library for Harvest's API (getharvest.com) which supports OAuth2 authentication. It's inspired by https://github.com/lann/Harvest and has some distinctions:\n\n * Supports Python 3x\n * Supports Oauth2\n * Has tests coverage\n\nIt doesn't support the basic authentication.\n\nHow to install\n-----\n\n```\n$ pip3 install harvest_api_client\n```\n\nHow to use it\n-----\n\n**Get the access and refresh tokens and put them in a file:**\n\n```\n {\n \"access_token\": {\n \"last_refresh_time\": \"2015-04-20T00:18:52.494946\", \n \"value\": \"[your access token]\"\n }, \"refresh_token\": {\n \"last_refresh_time\": \"2015-04-20T16:02:30.831858\", \n \"value\": \"[your refresh token]\"\n }\n }\n```\n**And you're ready to go:**\n\n```python\nfrom datetime import datetime, timedelta\nfrom harvest_api_client import Harvest\n\nclient_secret = 'your secret token'\nclient_id = 'your client id'\ntokens_file_name = 'tokens.json'\n\nh = Harvest(client_secret=client_secret, client_id=client_id, tokens_file_name=tokens_file_name)\nu1 = h.find_user('user1_first_name', 'user1_last_name') \n# => \n\nu2 = h.find_user('aaa', 'bbb') # \n# => \n\nprint(\"\\nProjects...\")\nfor p in h.projects():\n print(p)\n\nprint(\"\\nUsers...\")\nfor u in h.users():\n print(u)\n date1 = datetime(2013, 1, 1)\n date2 = datetime(2015, 11, 11)\n \n print(\"\\nEntries...\")\n for e in u.entries(date1, date2):\n print(e)\n```\n\n\nSource\n-----\n\nThe source is available at https://github.com/GildedHonour/harvest-api-client\n\n\nLicense\n-----\n\nThe MIT License (MIT)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GildedHonour/harvest-api-client", "keywords": "harvest-api,api,harvest.com,getharvest.com,harvest,api client", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "harvest_api_client", "package_url": "https://pypi.org/project/harvest_api_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/harvest_api_client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/GildedHonour/harvest-api-client" }, "release_url": "https://pypi.org/project/harvest_api_client/1.1.3/", "requires_dist": null, "requires_python": null, "summary": "A client for the Harvest API (getharvest.com)", "version": "1.1.3" }, "last_serial": 1660389, "releases": { "1.1.3": [ { "comment_text": "", "digests": { "md5": "269fdea4d0d556e34fccb1f806552185", "sha256": "455127e92935137e626bace758cc4c8574942ff91f2ac42dec68672efc967970" }, "downloads": -1, "filename": "harvest_api_client-1.1.3.tar.gz", "has_sig": false, "md5_digest": "269fdea4d0d556e34fccb1f806552185", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5933, "upload_time": "2015-04-23T21:05:07", "url": "https://files.pythonhosted.org/packages/aa/8e/11b618a174399e4e2286c5bbe3de2495fbdb319a9532f78da44bc9676e6d/harvest_api_client-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "269fdea4d0d556e34fccb1f806552185", "sha256": "455127e92935137e626bace758cc4c8574942ff91f2ac42dec68672efc967970" }, "downloads": -1, "filename": "harvest_api_client-1.1.3.tar.gz", "has_sig": false, "md5_digest": "269fdea4d0d556e34fccb1f806552185", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5933, "upload_time": "2015-04-23T21:05:07", "url": "https://files.pythonhosted.org/packages/aa/8e/11b618a174399e4e2286c5bbe3de2495fbdb319a9532f78da44bc9676e6d/harvest_api_client-1.1.3.tar.gz" } ] }