{ "info": { "author": "Kenneth Reitz", "author_email": "kenneth@heroku.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2" ], "description": "Heroku.py\n=========\n\nThis is an awesome Python wrapper for the Heroku API. The Heroku REST API\nallows Heroku users to manage their accounts, applications, addons, and\nother aspects related to Heroku. It allows you to easily utilize the Heroku\nplatform from your applications.\n\n\nUsage\n-----\n\nLogin with your password::\n\n import heroku\n cloud = heroku.from_pass('kenneth@heroku.com', 'xxxxxxx')\n\nOr your API Key (`available here `_)::\n\n cloud = heroku.from_key('YOUR_API_KEY')\n\nInteract with your applications::\n\n >>> cloud.apps\n [, , ...]\n\n >>> app = cloud.apps['sharp-night-7758']\n\n\nScale them up::\n\n >>> app.processes\n [, ]\n\n >>> app.processes['web']\n []\n\n >>> app.processes['web'].scale(3)\n [, , ]\n\n >>> app.processes[0].stop()\n True\n\n\nAccess the logs::\n\n >>> print app.logs(num=2)\n 2011-12-21T22:53:47+00:00 heroku[web.1]: State changed from down to created\n 2011-12-21T22:53:47+00:00 heroku[web.1]: State changed from created to starting\n\n >>> print app.logs(num=2, tail=True)\n \n\n\nYou can even stream the tail::\n\n >>> for line in app.logs(tail=True):\n ... print line\n\n 2011-12-21T22:53:47+00:00 heroku[web.1]: State changed from down to created\n 2011-12-21T22:53:47+00:00 heroku[web.1]: State changed from created to starting\n ...\n\n\nChange app configration::\n\n >>> app.config['DEBUG'] = 1\n >>> app.config\n {u'DEBUG': 1, u'PATH': u'bin:/usr/local/bin:/usr/bin:/bin', u'PYTHONUNBUFFERED': True}\n\n >>> del app.config['DEBUG']\n\nSee release history::\n\n >>> app.releases\n [, , ..., ]\n\n\n >>> release = app.releases[-2]\n >>> release.name\n v84\n\n >>> release.env\n {u'PATH': u'bin:/usr/local/bin:/usr/bin:/bin', u'PYTHONUNBUFFERED': True}\n\n >>> release.pstable\n {u'web': u'gunicorn httpbin:app -b \"0.0.0.0:$PORT\"'}\n\n >>> release.addons\n [u'blitz:250', u'custom_domains:basic', u'logging:basic', u'releases:advanced']\n\n >>> release.rollback()\n \n\nCreate a new app::\n\n >>> cloud.apps.add('myapp')\n \n\nDelete the app completely::\n\n >>> app.destroy()\n True\n\nAnd much more. Detailed docs forthcoming.\n\n\nCustomized Sessions\n-------------------\n\nHeroku.py is powered by `Requests `_ and supports all customized sessions:\n\nFor example advanced logging for easier debugging::\n\n >>> import sys\n >>> import requests\n >>> from heroku.api import Heroku\n\n >>> my_config = {'verbose': sys.stderr}\n >>> session = requests.session(config=my_config)\n >>> cloud = Heroku(session=session)\n >>> cloud.authenticate(cloud.request_key('kenneth@heroku.com', 'xxxxxxx'))\n >>> cloud.apps\n 2011-12-21T22:53:47+00:00 GET https://api.heroku.com/apps\n []\n\n\nInstallation\n------------\n\nTo install ``heroku.py``, simply::\n\n $ pip install heroku\n\nOr, if you absolutely must::\n\n $ easy_install heroku\n\nBut, you `really shouldn't do that `_.\n\n\nLicense\n-------\n\nCopyright (c) 2013 Heroku, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\nHistory\n-------\n0.1.4 (2013-05-30)\n++++++++++++++++++\n\n* Ignore what it's netrc\n* Fix Process.new() so it can spawn one-off processes\n* 'ps' keyword support for app logs\n\n0.1.3 (2013-05-01)\n++++++++++++++++++\n\n* Support for Labs (https://devcenter.heroku.com/articles/labs)\n* Bugfixes.\n* Better error handling.\n\n0.1.2 (2012-02-25)\n++++++++++++++++++\n\n* Bugfixes.\n* dateutil requirement.\n\n0.1.0 (2011-12-21)\n++++++++++++++++++\n\n* Initial release.", "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/heroku/heroku.py", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "heroku", "package_url": "https://pypi.org/project/heroku/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/heroku/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/heroku/heroku.py" }, "release_url": "https://pypi.org/project/heroku/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Heroku API Wrapper.", "version": "0.1.4" }, "last_serial": 3811296, "releases": { "0": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1a35a85d048a133b0bff25630d8f7929", "sha256": "f7df43af10d4be8e39bc93a372ee0b01e95a65b41796f20f30ad8b4ac7602d5a" }, "downloads": -1, "filename": "heroku-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1a35a85d048a133b0bff25630d8f7929", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9052, "upload_time": "2011-12-22T00:21:40", "url": "https://files.pythonhosted.org/packages/b8/aa/34bb609d13602462e2e3947fb5caad46e461bfffac31f72c222f0d98ddc0/heroku-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0177533324a4e818bc9e1c36114307b7", "sha256": "5ae3f2f38ac0a9ef50ddefd84e3e11895e22785003533a06a35108eadb716a1f" }, "downloads": -1, "filename": "heroku-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0177533324a4e818bc9e1c36114307b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9117, "upload_time": "2012-01-05T22:11:15", "url": "https://files.pythonhosted.org/packages/8c/9d/58bf0926f89b1960e2ad2df497b08d4f2c9089d67a076db9be371bd23251/heroku-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ffaf71f65b3577ca933a57d3e3341413", "sha256": "e88f4a162eca3eb668240fdda23a51ce04e720c75f33458e80422003cb314bbc" }, "downloads": -1, "filename": "heroku-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ffaf71f65b3577ca933a57d3e3341413", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9149, "upload_time": "2012-02-26T03:09:20", "url": "https://files.pythonhosted.org/packages/92/09/25be749babfe8faccd73615e30e1b71278098c819ddaaf4a98d347eacfe0/heroku-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7d110d7b60a8d233226b4550e82c9c90", "sha256": "d38b3baffb70a659785251b5ab4c39d7a8c2a54eb111af0f4e7aa9f1c1da42fa" }, "downloads": -1, "filename": "heroku-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7d110d7b60a8d233226b4550e82c9c90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9981, "upload_time": "2013-05-30T18:54:17", "url": "https://files.pythonhosted.org/packages/39/e0/f024eebdfa03a56b49356fc5ebacd806532eb14efc546f4573b15e7bb968/heroku-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "131ec2f755d3f4b59bd8f383b1bf3fdf", "sha256": "cbeba42b628bc38504d49ace86b8c1729ab2156e530fb1823954988932c8f7fb" }, "downloads": -1, "filename": "heroku-0.1.4.tar.gz", "has_sig": false, "md5_digest": "131ec2f755d3f4b59bd8f383b1bf3fdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10255, "upload_time": "2013-05-30T19:40:39", "url": "https://files.pythonhosted.org/packages/24/d3/867ad4bb9a300653b0dd0c0134a9986efe39506f6d89eb17b68cfce73357/heroku-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "131ec2f755d3f4b59bd8f383b1bf3fdf", "sha256": "cbeba42b628bc38504d49ace86b8c1729ab2156e530fb1823954988932c8f7fb" }, "downloads": -1, "filename": "heroku-0.1.4.tar.gz", "has_sig": false, "md5_digest": "131ec2f755d3f4b59bd8f383b1bf3fdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10255, "upload_time": "2013-05-30T19:40:39", "url": "https://files.pythonhosted.org/packages/24/d3/867ad4bb9a300653b0dd0c0134a9986efe39506f6d89eb17b68cfce73357/heroku-0.1.4.tar.gz" } ] }