Python
DevKit serves Python web apps with granian, one worker per site, started on the first request and reloaded when your code changes.
What DevKit recognises
Section titled “What DevKit recognises”- Django:
manage.py. DevKit reads the settings module from it and usesasgi.pywhen the project uses Channels or Daphne, otherwisewsgi.py. - FastAPI, Starlette and Flask: an app object such as
app = FastAPI()inmain.py,app.py,server.py,api.py,app/main.py,src/main.py,app/__init__.pyorsrc/app.py.
Python versions and packages
Section titled “Python versions and packages”DevKit uses uv to install Python versions and build each site’s .venv:
- With
pyproject.tomloruv.lock, DevKit runsuv sync. - With
requirements.txt, it creates.venvand 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:
devkit isolate 3.12 --site ledger-apiThe worker’s output is in Logs under the site’s name.