Get a lightweight Python framework for web development, ideal for startup founders and web developers, with 72k+ GitHub stars
71,892 stars16,896 forksPythonQuality 9/10Updated 6/10/2026100% free ยท open source
What it does
Flask is a lightweight Python framework for building web applications, allowing startup founders to quickly create and deploy web services.
Install / run
pip install flask
When to use it
โขBuilding a prototype or minimum viable product (MVP) for a web application
โขCreating a web service with a small codebase and few dependencies
โขDeveloping a RESTful API for a small to medium-sized application
Quick start
1Create a new file called `app.py` and add the basic application code: `from flask import Flask; app = Flask(__name__)`
2Define a route for the root URL: `@app.route('/'); def hello_world(): return 'Hello, World!'`
3Run the application using `flask run`
4Use a web browser to navigate to `http://localhost:5000` to see the application in action
5Modify the `app.py` file to add additional routes and functionality as needed
Ready-to-paste prompt
flask run --host=0.0.0.0 --port=5000 to run the application on all available network interfaces
Heads up: Make sure to set the `FLASK_APP` environment variable to the name of your application file (e.g. `export FLASK_APP=app.py`) before running `flask run`
Saves to your device
Topics
flask
jinja
pallets
python
web-framework
werkzeug
wsgi
What's inside โ free to inspect
No purchase needed
Read the entire source before you build โ unlike paid marketplaces that hide it behind a buy button.