Python
Detected from requirements.txt, Pipfile, or pyproject.toml.
See Buildpacksfor how detection and version policy work.
Detects
requirements.txt, Pipfile, or pyproject.toml in the base directory.
Versions
Default is Python 3.13. Published lines as of September 2026: 3.10-3.14. You get the latest patch of the requested minor.
Pin, in this order:
.python-versionruntime.txt(python-3.12is fine)requires-pythoninpyproject.toml(a range picks the highest matching published version)
Install and build
poetry.lock: Poetry,poetry install --no-devPipfile.lock: Pipenv,pipenv install --deploy --systemrequirements.txt:pip install -r requirements.txtpyproject.tomlwith[tool.poetry]and no lockfile: Poetry- Otherwise:
pip install .
Django apps (manage.py plus a Django dependency) run collectstatic --noinput. A failure there is logged and does not fail the build.
Launch sets PYTHONUNBUFFERED=1. Django also gets DJANGO_ENV=production and, when a */wsgi.py file exists, DJANGO_SETTINGS_MODULE.
Start command
- Django:
gunicorn <dir>.wsgi --bind 0.0.0.0:$PORT --workers 3 - FastAPI / Starlette:
uvicorn main:app --host 0.0.0.0 --port $PORT(orapp:appif that file holds the app) - Flask: Gunicorn on
app:app,application:app, orwsgi:app - Otherwise
python app.pyorpython main.py, or a simple HTTP server
Put gunicorn or uvicorn in your dependencies if you rely on those defaults. Override with a Procfile. Listen on PORT.