
Template details
Flask + Vercel
Deploy Flask 3 on Vercel using Serverless Functions with the Python runtime.
About this template
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.
What is Flask + Vercel?
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.
Key Features
- Flask 3 support — Uses Flask 3, the current major release of the Python microframework, with a single
app.pyentry point. - Serverless Functions via Python Runtime — Each Flask route is handled as a Vercel serverless function using the Python runtime, scaling on demand.
- WSGI compatibility — The template uses the Web Server Gateway Interface so existing Flask/WSGI apps can be adapted with minimal changes.
- One-click deploy — A Vercel button clones the repository and deploys it directly from the browser.
- Local development — Run
npm i -g verceland thenvercel devto serve the app athttp://localhost:3000with production-like behavior. - Live demo — A hosted example is provided to see the output before deploying your own.
- Open-source examples repo — Part of Vercel's
examplesrepository on GitHub, which has over 5,000 stars and includes many other framework examples.
Who is it for?
- Python developers — who want to deploy a Flask API or app to a serverless platform without configuring a VPS or container.
- Web developers exploring serverless — who need a minimal reference for how WSGI apps integrate with Vercel's Python runtime.
- Teams starting a new project — who want a clean, working Flask base that can be extended with routes, templates, and static files.
- Students or educators — who need a simple demonstration of Python web deployment to share in tutorials or workshops.
What can you do with Flask + Vercel?
- Deploy a REST API — Expose Flask endpoints that handle JSON requests and respond with JSON responses, running as serverless functions.
- Serve a dynamic website — Use Flask templates to render HTML pages, backed by Vercel's global edge network.
- Build a microservice — Separate a Python service into a Flask app and deploy it independently with its own URL.
- Test Vercel's Python runtime — Kick the tires on how Vercel handles WSGI apps before committing to a larger Python stack.
How does it work?
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.
FAQ
What is the Python runtime on Vercel?
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.
How do I run this template locally?
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.
Is this template free to use?
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.
Can I deploy an existing Flask app with this template?
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.
















