What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-29 21:21:15
flask example
# 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 2022-01-29 10:47:50
AttributeError: type object 'User' has no attribute 'query'
import os import sys from sqlalchemy import Column, ForeignKey, Integer, String, DateTime, Boolean, Float, Date, Table from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine fro... Add solution -
Python 2022-01-26 01:00:09
flask restful arguments in url
from flask import Flask, request from flask_restful import Api, Resource app = Flask(__name__) api = Api(app) # Flask mishandles boolean as string TRUTHY = ['true', 'True', 'yes'] class Item(Resource): def get(): # Get `class` list from reques... Add solution -
Python 2022-01-22 21:56:03
telegram bot python
import re from flask import Flask, request import telegram from telebot.credentials import bot_token, bot_user_name,URL global bot global TOKEN TOKEN = bot_token bot = telegram.Bot(token=TOKEN) app = Flask(__name__) @app.route('/{}'.format(TOKEN), met... Add solution -
Shell/Bash 2022-01-22 20:20:12
install flask apache on ec2 instance
setup apache flask on ec2 instance Add solution -
Python 2021-12-23 15:57:16
how to set route from different python file in flask
simple_page = Blueprint('simple_page', __name__, template_folder='templates') @simple_page.route('/<page>') def show(page): # stuff from yourapplication.simple_page import simple_page app = Flask(__name__) app.register_blueprint(simple_page) Add solution