Skip to content

app-generator/flask-learn-by-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn Flask by Coding

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 KIT 85%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.

Junior Developers Starter KIT


Getting Started with Flask

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

About

Flask Web Framework - Learn by Coding | AppSeed

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages