{"id":16247938,"url":"https://github.com/jcblw/heroku-python-demo","last_synced_at":"2025-08-17T05:04:07.639Z","repository":{"id":14220818,"uuid":"16927727","full_name":"jcblw/heroku-python-demo","owner":"jcblw","description":"a small python application that is setup  to deploy to heroku","archived":false,"fork":false,"pushed_at":"2014-02-17T21:57:54.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T05:02:29.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcblw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-17T21:49:39.000Z","updated_at":"2014-08-28T05:18:22.000Z","dependencies_parsed_at":"2022-09-03T10:00:59.600Z","dependency_job_id":null,"html_url":"https://github.com/jcblw/heroku-python-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcblw/heroku-python-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcblw%2Fheroku-python-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcblw%2Fheroku-python-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcblw%2Fheroku-python-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcblw%2Fheroku-python-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcblw","download_url":"https://codeload.github.com/jcblw/heroku-python-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcblw%2Fheroku-python-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270807935,"owners_count":24649346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:39:20.304Z","updated_at":"2025-08-17T05:04:07.569Z","avatar_url":"https://github.com/jcblw.png","language":"Python","readme":"# Deploy Python Apps to Heroku\n\nThis is a small app that will run on Heroku, this app is made to demonstrate how easy it is to deploy apps to heroku.\n\n## Setup\n\nHeroku heavily uses `git` so you will need that installed and then you will need dowload their [toolbelt](https://toolbelt.heroku.com/). You will also need a [Heroku Account](https://id.heroku.com/signup/devcenter) its free.\n\nIf you have never use Heroku before on your computer you will need to run `heroku login` to log into you account from you computer.\n\nFor python you will need to use [pip](http://www.pip-installer.org/en/latest/installing.html) as your depedency manager, and `virtualenv` to control your enviroment.\n\n#####  virtualenv\n\n```\npip install virtualenv\n```\n\nWhen in the directory of you app run \n\n```\nvirtualenv venv --distribute\n```\n\nThis will create a subdirectory to hold all your python modules. To activate the enviroment use.\n\n```\nsource venv/bin/activate\n```\nNow you will have a ton of files that you will not need to push up to Heroku that are in your directory. We can ignore them by adding them to the end of your `.gitignore` file. Eg.\n\n```\n# Virtual Enviroment\nvenv\n```\n\n##### Port Binding\n\nHeroku wants to tell your app which port to bind to. This is super simple to setup. Heroku does this by setting a enviroment variable `PORT`.\n\nIn your app for example it could be something like.\n\n```python\napp.run( port = int( os.getenv('PORT', 5000) ) );\n```\n\n## Startup\n\nOn your computer you can use anything to startup your app, but Heroku uses `Foreman` to startup apps. You can easily tell Foreman what to do by creating a procfile in the root of your directory. eg.\n\n```\nweb : gunicorn index:app\n```\n\nYou can test to see if it is working by using the command `foreman start`. You will not need to install `Foreman` it came bundled with the Heroku toolbelt.\n\n## Creating App\n\nFirst initialize git.\n\n```\ngit init\n```\n\nAfter all the this settup you are now about ready to deploy the application up to Heroku. First tho you need to create an app on their service.\n\n```\nheroku apps:create {app_name}\n```\n\nThis should create the app on Heroku's server, and also add a git remote `heroku` to this repo.\n\n## Deploy\n\nLike mentioned above Heroku uses `git` to deploy. So you need to settup you app, or make a new commit to push up to Heroku.\n\n```\ngit add --all\ngit commit -am \"Initial Commit\"\ngit push heroku master\n```\n\nYou should see a stream of deploy information in your console, and then a url to see where you app is living.\n\n## Debugging\n\nNot all pushes go so easily but luckly there is a easy way to see what is going on with your app while it is running on heroku.\n\n```\nheroku logs --tail\n```\n\nThis will stream the logs from your app so you can see potential issues.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcblw%2Fheroku-python-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcblw%2Fheroku-python-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcblw%2Fheroku-python-demo/lists"}