Learn how to create a web application using Flask’s simple yet powerful framework. This guide shows you how to deploy a Python web app with automatic scaling.

What you’ll learn

Flask

Build Python web apps

Autoscaling

Deploy with automatic scaling

Web Development

Create dynamic web pages

Deployment

Host your application

Create your app

1

Fork the template

Sign in to Replit and fork the Flask template. Select + Use Template and follow the prompts to create your Replit App.

Flask’s development server automatically reloads when you make changes to your code.

2

Configure deployment

  1. Select Deploy in the workspace header
  2. Choose Autoscale deployment
  3. Configure your deployment:
    • Machine: 1vCPU, 2 GiB RAM (default)
    • Max machines: 3 (default)
    • Run command: python3 main.py

Autoscale deployments automatically adjust resources based on website traffic.

3

Launch

Select Deploy to start the deployment process. Your website will be live in a few minutes!

Customization options

Routes

  • Add new pages
  • Handle form submissions
  • Create API endpoints

Templates

  • Design page layouts
  • Add dynamic content
  • Style your pages

Next steps

Want to learn more about web development? Check out our deployment documentation.