What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-02 10:28:02
flask tutorial
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution -
Python 2021-09-01 08:04:02
creating an apis with python and flask
from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): return {'hello': 'world'} api.add_resource(HelloWorld, '/') if __name__ == '__main__': app.... Add solution -
-
Python 2021-08-30 18:40:02
python web app
# Core web app using flask # Download flask if you haven't from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' if __name__ == '__main__': app.run() # If you want to put this on the internet, u... Add solution -
Python 2021-08-29 21:10:02
image objects in python
from flask import Flask, render_template, redirect, url_for, send_from_directory, request from flask_bootstrap import Bootstrap from PIL import Image from werkzeug.utils import secure_filename import os app = Flask(__name__) Bootstrap(app) APP_ROOT = os... Add solution -
Python 2021-08-28 08:14:01
hello world code in flask
#Save the file as app.py from flask import Flask app=Flask(__name__) @app.route('/',methods=['GET','POST']) def Home(): return "Hello World" #Run on command Prompt following commands(Windows): # >>cd Desktop/ # >>cd FlaskFol... Add solution -
Python 2021-08-26 10:52:02
export flask app
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution