Deploy a Flask App
You can deploy a Flask application on Render in just a few clicks.
A sample app for this quick start is deployed at https://flask.onrender.com. The code uses Gunicorn to serve your app in a production setting.
Fork render-examples/flask-hello-world on GitHub. This is the content of the app we’re deploying, from a minimal Flask application in the official docs:
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!'
Create a new Web Service on Render, and give Render permission to access your new repo.
Use the following values during creation:
pip install -r requirements.txt
That’s it! Your web service will be live on your Render URL as soon as the build finishes.
Going forward, every push to your repo will automatically build your app and deploy it in production. If the build fails, Render will automatically stop the deploy process and the existing version of your app will keep running until the next successful deploy.
See Specifying a Python Version if you need to customize the version of Python used for your app.