Skip to main content
A Python web application runs on Sevalla as an application: Sevalla builds an image from your Git repository, then runs it as processes. The web process serves HTTP with a production server such as Gunicorn or Uvicorn, background workers run task queues such as Celery, and jobs run migrations before each deployment.

Framework guides

Django

Deploy Django, then add object storage, caching, async views, Celery, health checks and multitenancy.

FastAPI

Deploy FastAPI with SQLModel and Alembic, then add object storage, caching, Celery and health checks.

Flask

Deploy Flask with an application factory, then add caching, Celery and health checks.
Moving from Heroku? See Migrate from Heroku.

How Python applications run on Sevalla

See Processes for every process type and its settings.

Connection variables

When you add an internal connection and turn on Add environment variables to the application, Sevalla adds these variables (see Environment variables an internal connection adds). You can rename them in the same sheet before you save, for example DB_URL to DATABASE_URL. Two schemes need care in Python:
  • SQLAlchemy (and so SQLModel, Flask-SQLAlchemy-Lite and Alembic) doesn’t accept postgres://. Replace it with postgresql+psycopg:// in code. Django’s database URL parsers accept it as is.
  • redis-py, Celery and Django’s Redis cache accept redis://, rediss:// and unix:// only. With a Valkey database, replace valkey:// with redis://.