Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Deploy Flask 3 on Vercel using Serverless Functions with the Python runtime.
Flask + Vercel is a boilerplate template that deploys a Flask 3 application on Vercel's serverless platform using the Python runtime and WSGI. It is part of Vercel's curated collection of examples and solutions on GitHub, designed to demonstrate how Python web apps can run as serverless functions.
This template connects Flask 3 to Vercel's serverless functions, letting you run a Python WSGI application without maintaining your own server. It takes a standard Flask app (single Python file with routes) and configures it to be built and deployed through Vercel. The output is a live URL—a demo is available at https://flask-python-template.vercel.app/—and the project is maintained by Vercel within their public examples repository.
app.py entry point.npm i -g vercel and then vercel dev to serve the app at http://localhost:3000 with production-like behavior.examples repository on GitHub, which has over 5,000 stars and includes many other framework examples.The template relies on Vercel's Python runtime and a WSGI adapter. When you deploy, Vercel detects the Flask app, builds it, and serves each request through a serverless function that calls the WSGI application. Locally, vercel dev emulates this environment by running the same functions on your machine. The one-click deploy path uses the GitHub repository URL to clone and configure a new Vercel project.
Vercel's Python runtime is a serverless function environment that executes Python code (Flask in this template) in response to HTTP requests. It is part of Vercel's serverless functions offering, and this template demonstrates its use with the WSGI protocol.
Install the Vercel CLI with npm i -g vercel, then run vercel dev in the project root. Your Flask app will be available at http://localhost:3000, mirroring how it will behave in production.
The template itself is open source and free. Vercel's platform offers a free tier, though pricing for serverless functions is based on usage—the template page does not state specific costs, so check Vercel's pricing page for details.
Yes. Since the template uses standard WSGI configuration, you can copy your Flask routes and application object into the template's structure to migrate an existing app. For apps with complex dependencies, you may need to adjust the Python version or add a vercel.json file.
