{ "info": { "author": "Phillip Stromberg", "author_email": "phillip@4stromberg.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": "basecampy3", "package_url": "https://pypi.org/project/basecampy3/", "platform": "", "project_url": "https://pypi.org/project/basecampy3/", "project_urls": { "Homepage": "https://github.com/phistrom/basecampy3" }, "release_url": "https://pypi.org/project/basecampy3/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": 3785554, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "0d36e1a6550220cd9af739c07bab311e", "sha256": "6e361d0f64df33b4ff77cdb3aab83c4bbeafc65a1e1a95d04ba20e4d892a2ce8" }, "downloads": -1, "filename": "basecampy3-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0d36e1a6550220cd9af739c07bab311e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27098, "upload_time": "2018-04-18T21:13:39", "url": "https://files.pythonhosted.org/packages/2e/8b/b9f32e21ce73f458c87ab7fbfb5a4967eb0ac5fabc35f81e989f81a8f710/basecampy3-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "536a80ce1095d1fe742888877b799f6d", "sha256": "43c5ff7cd12682299a6e33443de1bf9d41ca31e5ff87cbc817b8b74fcbf0ad88" }, "downloads": -1, "filename": "basecampy3-0.1.6.tar.gz", "has_sig": false, "md5_digest": "536a80ce1095d1fe742888877b799f6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27244, "upload_time": "2018-04-19T03:07:28", "url": "https://files.pythonhosted.org/packages/51/50/f49ff7e322c28aacad458dc333ba6b944ba8bdeade6f1aac88044a055dba/basecampy3-0.1.6.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e2763153693b6bb439464ec1c94299b9", "sha256": "b506395cfd0a4c06b6764518152cfb52b14f5572d8d28836f43a04938a9873f9" }, "downloads": -1, "filename": "basecampy3-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e2763153693b6bb439464ec1c94299b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28643, "upload_time": "2018-04-20T19:13:01", "url": "https://files.pythonhosted.org/packages/a3/aa/6656cc937ed06392063524f04f3a86a81962f4a04f17a11a36003ee06367/basecampy3-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2763153693b6bb439464ec1c94299b9", "sha256": "b506395cfd0a4c06b6764518152cfb52b14f5572d8d28836f43a04938a9873f9" }, "downloads": -1, "filename": "basecampy3-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e2763153693b6bb439464ec1c94299b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28643, "upload_time": "2018-04-20T19:13:01", "url": "https://files.pythonhosted.org/packages/a3/aa/6656cc937ed06392063524f04f3a86a81962f4a04f17a11a36003ee06367/basecampy3-0.2.2.tar.gz" } ] }