Open-source project provided by AppSeed to help beginners accommodate faster with Flask. For newcomers, Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications.
🚀
PROMO
: Junior Developers Starter KIT85%OFF
The package includes a rock-solid collection of premium assets
(Kits & Dashboards) that can be used to build eye-catching portfolios and web apps in no time.
Create a Virtual Environment
$ # Virtualenv modules installation (Unix-based systems)
$ virtualenv env
$ source env/bin/activate
$
$ # Virtualenv modules installation (Windows-based systems)
$ # virtualenv env
$ # .\env\Scripts\activate
Install
Flask
$ pip install flask
Edit your first Flask app
main.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello from Flask!'
Setup the environment
$ # Set the FLASK_APP environment variable
$ (Unix/Mac) export FLASK_APP=main.py
$ (Windows) set FLASK_APP=main.py
$ (Powershell) $env:FLASK_APP = ".\main.py"
Start the app
$ flask run
$
$ # Access the app in browser: http://127.0.0.1:5000/
Learn Flask by Coding - Provided and actively supported by AppSeed App Generator