How can I pass myvariable
to the app
in the below code? myvariable
is a variable that comes from the rest of the code rather than being received from the URL.
@app.route("/myrout", methods=["GET"])
def myfunction(myvariable):
CodePudding user response:
global myvariable=8
@app.route("/myrout", methods=["GET"])
def myfunction():
global myvariable
local_variable=myvariable