Back to templates

Flask Starter

Starter template for using Flask framework in Wasmer Edge
Starter template for using Flask framework in Wasmer Edge
Depends on
Flask iconFlask
Use cases

This is a simple Flask Web Server template


First, create a local virtual environment:

python3 -m venv .env
source .env/bin/activate

Install the dependencies with:

pip install Flask

Then, you can run the Flask app (src/ with Python:

$ python src/
 * Serving Flask app '/src/main'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on
Press CTRL+C to quit

You can run the Flask example using Wasmer (check out the install guide):

wasmer run wasmer-examples/flask-wasmer-starter --net

[!TIP] You can also run wasmer run . --net in the root of this repo

Open http://localhost:3000 with your browser to see the Flask application.

Deploy on Wasmer Edge

The easiest way to deploy your Flask app is to use the Wasmer Edge.

Live example:

Run this commmand to deploy to Wasmer Edge:

wasmer deploy

[!NOTE] You will need to change the namespace in wasmer.toml to your own namespace and app name in app.yaml to your own app name.

Making software universally accessible