Skip to content

Python

DevKit serves Python web apps with granian, one worker per site, started on the first request and reloaded when your code changes.

  • Django: manage.py. DevKit reads the settings module from it and uses asgi.py when the project uses Channels or Daphne, otherwise wsgi.py.
  • FastAPI, Starlette and Flask: an app object such as app = FastAPI() in main.py, app.py, server.py, api.py, app/main.py, src/main.py, app/__init__.py or src/app.py.

DevKit uses uv to install Python versions and build each site’s .venv:

  • With pyproject.toml or uv.lock, DevKit runs uv sync.
  • With requirements.txt, it creates .venv and installs the requirements.

The version comes from .python-version when the project has one; otherwise the default on the Runtimes screen. Pin a site with:

Terminal window
devkit isolate 3.12 --site ledger-api

The worker’s output is in Logs under the site’s name.