{ "info": { "author": "Rostislav Misiura", "author_email": "rostislav9999@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "# BasecamPY3\nAn easy-to-use Python interface to the [Basecamp 3 API](https://github.com/basecamp/bc3-api).\n\n*While BasecamPY3 aims to be equally functional in Python 2.7, the majority of testing has been in Python 3.4+ during this early stage of its development.*\n\n## Features\n - Easy, AWS CLI-like configuration and installation\n - Object-oriented API\n - Handles rate-limiting, caching, and authentication for you!\n\n## Install\n```\npip install basecampy3\nbc3 configure\n```\nFollow the prompts to obtain an access and refresh token which is then saved to `~/.conf/basecamp.conf`, allowing you to call `Basecamp3()` without any parameters. You will need to make your own [Basecamp 3 app integration](https://launchpad.37signals.com/integrations) first.\n\n## Usage\n### Basic Example\n```py\nfrom basecampy3 import Basecamp3\n\nbc3 = Basecamp3()\n\nfor project in bc3.projects.list():\n print(project.name)\n\nnew_project = bc3.projects.create(\"My New Project\", description=\"The best project ever made.\")\nnew_project.campfire.post_message(\"Hello World!\")\nnew_message = new_project.message_board.post_message(\"Check this out\", content=\"This is a new message thread start.\")\nnew_message.archive()\n\ntodolist = new_project.todoset.create(\"Things to be done\")\ntodolist.create(\"Get Milk\")\ntodolist.create(\"Get Eggs\")\ngo_to_bed = todolist.create(\"Go to bed.\")\ngo_to_bed.check() # this is marked as done\n```\n\n**Not all functionality of the API is available yet.** For anything missing, you can use the [requests Session object](http://docs.python-requests.org/en/master/user/advanced/#session-objects) yourself directly and consult the [Basecamp 3 API docs](https://github.com/basecamp/bc3-api/tree/master/sections). The benefit of using this Session object is you will benefit from the authentication, rate-limiting, and caching features.\n\n### Direct Session Example\n```py\nfrom basecampy3 import Basecamp3\nfrom pprint import pprint\n\nbc3 = Basecamp3()\nsession = bc3._session\nMY_COMPANY_ID = 1234567\nrecording_id = 123456789\nproject_id = 1234567\n\n# Reference:\n# https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#get-comments\nBASE_URL = \"https://3.basecampapi.com/{company_id}/\".format(company_id=MY_COMPANY_ID) # base of all API requests\nENDPOINT = \"{base_url}/buckets/{project_id}/recordings/{recording_id}/comments.json\" # get comments endpoint\nurl = ENDPOINT.format(base_url=BASE_URL, project_id=project_id, recording_id=recording_id)\nresp = session.get(url) # make a GET request. Substitute get() with post() or put() or delete() as needed\nif not resp.ok: # API returned a 4XX or 5XX error\n print(\"Something went wrong.\")\npprint(resp.json()) # resp.json() will make a nice dictionary of the JSON response from Basecamp\n```\n\n### CLI Example\n**COMING SOON!**\nCommand Line interface for doing stuff with Basecamp.\n**(not working yet)**\n```\n $ bc3 projects list\n```\n\n## Todo\n - The rest of the Basecamp 3 API\n - Command line tool (beyond just the \"configure\" command)\n - Better testing coverage", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/phistrom/basecampy3", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "basecampy3R", "package_url": "https://pypi.org/project/basecampy3R/", "platform": "", "project_url": "https://pypi.org/project/basecampy3R/", "project_urls": { "Homepage": "https://github.com/phistrom/basecampy3" }, "release_url": "https://pypi.org/project/basecampy3R/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Aims to be the easiest to use version of the Basecamp 3 API", "version": "0.2.2" }, "last_serial": 4910825, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "c920986c0e3023c3330ae3081db279bf", "sha256": "0f1eaa7241916971c6d1b4ba4db6685a1652a542f3b52567c6692f5e88cb81dd" }, "downloads": -1, "filename": "basecampy3R-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c920986c0e3023c3330ae3081db279bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30494, "upload_time": "2019-03-07T14:25:36", "url": "https://files.pythonhosted.org/packages/e3/98/d37e4cf20d392b390f0b0a030addc9ba337fe444f10de388699eac346da4/basecampy3R-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c920986c0e3023c3330ae3081db279bf", "sha256": "0f1eaa7241916971c6d1b4ba4db6685a1652a542f3b52567c6692f5e88cb81dd" }, "downloads": -1, "filename": "basecampy3R-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c920986c0e3023c3330ae3081db279bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30494, "upload_time": "2019-03-07T14:25:36", "url": "https://files.pythonhosted.org/packages/e3/98/d37e4cf20d392b390f0b0a030addc9ba337fe444f10de388699eac346da4/basecampy3R-0.2.2.tar.gz" } ] }