Docs menu

Python

Deploy Python apps on Primcloud: every supported CPython version, three package managers (pip, Poetry, uv), and Django and Flask as first-class targets.

On this page

Primcloud deploys Python apps managed by pip, Poetry, or uv. Detection triggers when Primcloud finds a Python project file at the root of your repo: a requirements.txt, poetry.lock, uv.lock, .python-version, pyproject.toml, manage.py, or one of a handful of other Python-shaped files. The Python version is resolved from a .python-version file at the repo root; when there isn't one, Primcloud installs the latest patch of Python 3.14. The package manager is picked from whichever lockfile (or requirements.txt) is present at the root.

If no Procfile is present, Primcloud has no default way to boot a Python app. Every Python app on Primcloud ships a Procfile that names the process types and their commands (web: gunicorn myapp.wsgi, worker: celery -A myapp worker, and so on).

Django apps get one extra treat: if the build sees Django installed and a manage.py at the root, it runs python manage.py collectstatic --noinput at the end of the build so static assets are ready to serve.

What's in this section#

  • Getting started with Python: deploy a minimal Python web app end-to-end.
  • Python on Primcloud: detection, package manager selection, install and compile phases, cache, and Django's collectstatic hook.
  • Runtime versions: supported Python versions, pinning via .python-version, and upgrade path.
  • Package managers: how pip, Poetry, and uv are each selected and installed, and how to authenticate against private indexes.
  • Customizing the build: release-phase commands, dependency-group filtering, native dependencies, and Debian packages via project.toml.
  • Troubleshooting Python: common build and runtime errors with fixes.
  • Deploying Django: Procfile shape, collectstatic, database URLs, and Django-specific gotchas on Primcloud.
  • Deploying Flask: Procfile shape, WSGI server choice, and Flask-specific gotchas on Primcloud.