Answers for "flask import app"

3

import flask

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'
Posted by: Guest on June-11-2020
0

flask app.py

# coding: utf-8
from flask import Flask, render_template
from flask.ext.gist import Gist

app = Flask(__name__, template_folder='.')
Gist(app)


@app.route('/')
def index():
    return render_template('example.html')


if __name__ == "__main__":
    app.run(host='0.0.0.0', debug=True)
Posted by: Guest on July-11-2021
0

how to import flask

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello, World!"
Posted by: Guest on July-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language