Go to file
Ed Morley b70427bd26
Release v213 (#1336)
GUS-W-11283397.
2022-06-14 22:24:11 +01:00
.circleci Enable retries and connection timeouts when using `curl` (#1335) 2022-06-13 20:19:41 +01:00
.github Change Dependabot to monthly (#1328) 2022-05-18 07:34:14 +00:00
bin Enable retries and connection timeouts when using `curl` (#1335) 2022-06-13 20:19:41 +01:00
builds Enable retries and connection timeouts when using `curl` (#1335) 2022-06-13 20:19:41 +01:00
etc Buildpack release script usability improvements (#1207) 2021-05-21 16:49:39 +01:00
spec Add support for Python 3.10.5 (#1332) 2022-06-07 10:39:03 +01:00
vendor Migrate away from `sp-grep` (#1119) 2020-11-12 17:42:51 +00:00
.dockerignore Improve the workflow for generating binaries for Heroku-16 (#387) 2017-05-25 11:55:57 -07:00
.gitignore Tests: Replace Django shunit2 test with Hatchet tests (#1161) 2021-01-25 12:29:18 +00:00
.rubocop.yml Tests: Add additional log output to the editable package tests (#1253) 2021-10-19 15:45:19 +01:00
CHANGELOG.md Release v213 (#1336) 2022-06-14 22:24:11 +01:00
Gemfile CI: Migrate from Travis CI to Circle CI (#1164) 2021-01-29 21:35:24 +00:00
Gemfile.lock Bump rubocop-rspec from 2.10.0 to 2.11.1 (#1329) 2022-06-01 19:38:50 +01:00
LICENSE Updated license for 2022 (#1279) 2022-01-14 16:03:48 +00:00
Makefile Add support for the Heroku-22 stack (#1299) 2022-05-24 23:53:58 +01:00
README.md Add support for the Heroku-22 stack (#1299) 2022-05-24 23:53:58 +01:00
buildpack.toml Remove Git2GUS configuration (#1163) 2021-01-30 00:00:02 +00:00
hatchet.json Tests: Cleanup of existing Hatchet tests (#1162) 2021-01-25 14:42:27 +00:00
hatchet.lock Tests: Cleanup of existing Hatchet tests (#1162) 2021-01-25 14:42:27 +00:00
requirements.txt Bump bob-builder from 0.0.18 to 0.0.19 (#1088) 2020-10-05 08:47:36 +01:00

README.md

python

Heroku Buildpack: Python

CircleCI

This is the official Heroku buildpack for Python apps.

Recommended web frameworks include Django and Flask, among others. The recommended webserver is Gunicorn. There are no restrictions around what software can be used (as long as it's pip-installable). Web processes must bind to $PORT, and only the HTTP protocol is permitted for incoming connections.

See it in Action

$ ls
my-application		requirements.txt	runtime.txt

$ git push heroku main
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 276 bytes | 276.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting flask (from -r /tmp/build_c2c067ef79ff14c9bf1aed6796f9ed1f/requirements.txt (line 1))
remote:          Downloading ...
remote:        Installing collected packages: Werkzeug, click, MarkupSafe, Jinja2, itsdangerous, flask
remote:        Successfully installed Jinja2-2.10 MarkupSafe-1.1.0 Werkzeug-0.14.1 click-7.0 flask-1.0.2 itsdangerous-1.1.0
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:

A requirements.txt must be present at the root of your application's repository to deploy.

To specify your python version, you also need a runtime.txt file - unless you are using the default Python runtime version.

Current default Python Runtime: Python 3.10.4

Alternatively, you can provide a setup.py file, or a Pipfile. Using pipenv will generate runtime.txt at build time if one of the field python_version or python_full_version is specified in the requires section of your Pipfile.

Specify a Buildpack Version

You can specify the latest production release of this buildpack for upcoming builds of an existing application:

$ heroku buildpacks:set heroku/python

Specify a Python Runtime

Supported runtime options include:

  • python-3.10.4 on all supported stacks
  • python-3.9.13 on all supported stacks
  • python-3.8.13 on Heroku-18 and Heroku-20 only
  • python-3.7.13 on Heroku-18 and Heroku-20 only