{"id":21431,"library":"heroku3","title":"Heroku3","description":"Python wrapper for the Heroku API v3. Current version 5.2.1. Low release cadence; last stable release 5.2.0. Supports Python 3 only since v3.4.0.","status":"active","version":"5.2.1","language":"python","source_language":"en","source_url":"https://github.com/martyzz1/heroku3.py","tags":["heroku","api-wrapper","cloud"],"install":[{"cmd":"pip install heroku3","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Heroku","correct":"from heroku3 import Heroku"}],"quickstart":{"code":"import os\nfrom heroku3 import Heroku\n\nheroku = Heroku(token=os.environ.get('HEROKU_API_KEY', ''))\naccount = heroku.account()\nprint(f\"Account email: {account.email}\")\napps = heroku.apps()\nprint(f\"Number of apps: {len(apps)}\")","lang":"python","description":"Initialize Heroku client and list apps."},"warnings":[{"fix":"Update code to handle single release object. E.g., `release = app.releases()[-1]` is now `release = app.releases()[-1]` still works but note behavior change.","message":"In v5.2.0, the release endpoint changed to return a single instance instead of a list. Code expecting list will break.","severity":"breaking","affected_versions":">=5.2.0"},{"fix":"Upgrade to Python 3.6+ and heroku3 >=3.4.0.","message":"Python 2.6 support dropped in v3.4.0. Python 2.7 support likely dropped in later versions.","severity":"deprecated","affected_versions":"<3.4.0"},{"fix":"Generate an API key from Heroku dashboard: Account settings > API Key.","message":"Heroku API keys are required. Only OAuth tokens are supported by heroku3; session cookies or other auth methods not available.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from heroku3 import Heroku`","cause":"Incorrect import: using `import heroku3` then `heroku3.Heroku` works, but some tutorials show `from heroku3 import Heroku` which is correct.","error":"AttributeError: module 'heroku3' has no attribute 'Heroku'"},{"fix":"Check network connectivity and verify Heroku API URL. The library defaults to https://api.heroku.com/","cause":"Heroku API endpoint not reachable, typically due to network issues or incorrect API URL.","error":"httpx.ConnectError: [Errno 61] Connection refused"},{"fix":"Check for None: `releases = app.releases() or []`","cause":"Calling `.releases()` on an app returns a paginated iterator; if no releases, it may return None.","error":"TypeError: 'NoneType' object is not iterable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}